1--TEST-- 2executing a code with -R 3--SKIPIF-- 4<?php 5include "skipif.inc"; 6if (substr(PHP_OS, 0, 3) == 'WIN') { 7 die ("skip not for Windows"); 8} 9?> 10--FILE-- 11<?php 12 13$php = getenv('TEST_PHP_EXECUTABLE_ESCAPED'); 14 15$filename_txt = __DIR__."/010.test.txt"; 16$filename_txt_escaped = escapeshellarg($filename_txt); 17 18$txt = ' 19test 20hello 21'; 22 23file_put_contents($filename_txt, $txt); 24 25var_dump(`cat $filename_txt_escaped | $php -n -R "var_dump(1);"`); 26 27@unlink($filename_txt); 28 29echo "Done\n"; 30?> 31--EXPECT-- 32string(21) "int(1) 33int(1) 34int(1) 35" 36Done 37