xref: /PHP-7.3/sapi/cli/tests/010-2.phpt (revision 782352c5)
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');
14
15$filename_txt = dirname(__FILE__)."/010.test.txt";
16
17$txt = '
18test
19hello
20';
21
22file_put_contents($filename_txt, $txt);
23
24var_dump(`cat "$filename_txt" | "$php" -n -R "var_dump(1);"`);
25
26@unlink($filename_txt);
27
28echo "Done\n";
29?>
30--EXPECT--
31string(21) "int(1)
32int(1)
33int(1)
34"
35Done
36