Commit 2ef52700537 for php

commit 2ef52700537f6bfbb0bb92ee1debdd5d0485206f
Author: Gina Peter Banyard <girgias@php.net>
Date:   Thu Oct 15 01:23:35 2026 +0100

    Revert "ext/standard/tests: work around Windows quoting with tempfiles."

    This reverts commit 077d7d6024f7bb7b1183fdae51745880abac76a6.

    As it breaks tests in 8.5 and above.

diff --git a/ext/standard/tests/general_functions/proc_open_null.phpt b/ext/standard/tests/general_functions/proc_open_null.phpt
index 6c869725dd2..f5ea603f04b 100644
--- a/ext/standard/tests/general_functions/proc_open_null.phpt
+++ b/ext/standard/tests/general_functions/proc_open_null.phpt
@@ -5,9 +5,7 @@

 $php = getenv('TEST_PHP_EXECUTABLE');
 $args = getenv('TEST_PHP_EXTRA_ARGS');
-$fn = tempnam(sys_get_temp_dir(), "PROC_OPEN_TEST");
-$cmd = "$php $args " . escapeshellarg($fn);
-file_put_contents($fn, '<?php echo "Test"; fprintf(STDERR, "Error");');
+$cmd = "$php $args -r 'echo \"Test\"; fprintf(STDERR, \"Error\");'";

 $proc = proc_open($cmd, [1 => ['null'], 2 => ['pipe', 'w']], $pipes);
 var_dump($pipes);
@@ -18,17 +16,16 @@
 var_dump($pipes);
 var_dump(stream_get_contents($pipes[1]));
 proc_close($proc);
-unlink($fn);

 ?>
 --EXPECT--
 array(1) {
   [2]=>
-  resource(6) of type (stream)
+  resource(4) of type (stream)
 }
 string(5) "Error"
 array(1) {
   [1]=>
-  resource(8) of type (stream)
+  resource(6) of type (stream)
 }
 string(4) "Test"
diff --git a/ext/standard/tests/general_functions/proc_open_redirect.phpt b/ext/standard/tests/general_functions/proc_open_redirect.phpt
index add5e6031ee..c8d29e89477 100644
--- a/ext/standard/tests/general_functions/proc_open_redirect.phpt
+++ b/ext/standard/tests/general_functions/proc_open_redirect.phpt
@@ -26,9 +26,7 @@
 }

 echo "\nWith pipe:\n";
-$fn = tempnam(sys_get_temp_dir(), "PROC_OPEN_TEST");
-file_put_contents($fn, '<?php echo "Test\n"; fprintf(STDERR, "Error");');
-$cmd = "$php $args " . escapeshellarg($fn);
+$cmd = "$php $args -r 'echo \"Test\n\"; fprintf(STDERR, \"Error\");'";
 $proc = proc_open($cmd, [1 => ['pipe', 'w'], 2 => ['redirect', 1]], $pipes);
 var_dump($pipes);
 var_dump(stream_get_contents($pipes[1]));
@@ -54,7 +52,6 @@
 echo "\nWith inherited stdout:\n";
 $proc = proc_open($cmd, [2 => ['redirect', 1]], $pipes);
 proc_close($proc);
-unlink($fn);

 ?>
 --EXPECTF--
@@ -66,7 +63,7 @@
 With pipe:
 array(1) {
   [1]=>
-  resource(6) of type (stream)
+  resource(4) of type (stream)
 }
 string(10) "Test
 Error"