1--TEST-- 2executing a file with -F 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'); 14 15$filename = __DIR__."/010.test.php"; 16$filename_txt = __DIR__."/010.test.txt"; 17 18$code = ' 19<?php 20var_dump(fread(STDIN, 10)); 21?> 22'; 23 24file_put_contents($filename, $code); 25 26$txt = ' 27test 28hello'; 29 30file_put_contents($filename_txt, $txt); 31 32var_dump(`cat "$filename_txt" | "$php" -n -F "$filename"`); 33 34?> 35===DONE=== 36--CLEAN-- 37<?php 38@unlink(__DIR__."/010.test.php"); 39@unlink(__DIR__."/010.test.txt"); 40?> 41--EXPECTF-- 42string(25) " 43string(10) "test 44hello" 45" 46===DONE=== 47