Cannot open the buffered I/O php://input and php://output constants.
Also, the STDIN, STDOUT and STDERR constants that should set to be already-opened php://stdin, php://stdout, php://stderr streams are just strings.
Code:
<?php
var_dump(\STDIN);
var_dump(\STDOUT);
var_dump(\STDERR);
var_dump(fopen('php://input', 'r'));
var_dump(fopen('php://output', 'w'));
var_dump(fopen('php://stdin', 'r'));
var_dump(fopen('php://stdout', 'w'));
var_dump(fopen('php://stderr', 'w'));
Result:
[daniil@daniil-arch jav]$ jppm start
-> linux
-> app:run
-> install
string(5) "STDIN"
string(6) "STDOUT"
string(6) "STDERR"
Warning: fopen(): failed to open stream, null in 'res://7.php' on line 6 at pos 10
bool(false)
Warning: fopen(): failed to open stream, null in 'res://7.php' on line 7 at pos 10
bool(false)
object(php\io\MiscStream)#1031061344 (4) {
["path":"php\io\MiscStream":private]=>
string(5) "stdin"
["mode":"php\io\MiscStream":private]=>
string(1) "r"
["path":"php\io\Stream":private]=>
NULL
["mode":"php\io\Stream":private]=>
NULL
}
object(php\io\MiscStream)#686466458 (4) {
["path":"php\io\MiscStream":private]=>
string(6) "stdout"
["mode":"php\io\MiscStream":private]=>
string(1) "w"
["path":"php\io\Stream":private]=>
NULL
["mode":"php\io\Stream":private]=>
NULL
}
object(php\io\MiscStream)#875016237 (4) {
["path":"php\io\MiscStream":private]=>
string(6) "stderr"
["mode":"php\io\MiscStream":private]=>
string(1) "w"
["path":"php\io\Stream":private]=>
NULL
["mode":"php\io\Stream":private]=>
NULL
}
The buffered I/O streams can just be linked to stdin and stdout, like they normally are on PHP CLI.
Reactions are currently unavailable
Cannot open the buffered I/O php://input and php://output constants.
Also, the STDIN, STDOUT and STDERR constants that should set to be already-opened php://stdin, php://stdout, php://stderr streams are just strings.
Code:
Result:
[daniil@daniil-arch jav]$ jppm start -> linux -> app:run -> install string(5) "STDIN" string(6) "STDOUT" string(6) "STDERR" Warning: fopen(): failed to open stream, null in 'res://7.php' on line 6 at pos 10 bool(false) Warning: fopen(): failed to open stream, null in 'res://7.php' on line 7 at pos 10 bool(false) object(php\io\MiscStream)#1031061344 (4) { ["path":"php\io\MiscStream":private]=> string(5) "stdin" ["mode":"php\io\MiscStream":private]=> string(1) "r" ["path":"php\io\Stream":private]=> NULL ["mode":"php\io\Stream":private]=> NULL } object(php\io\MiscStream)#686466458 (4) { ["path":"php\io\MiscStream":private]=> string(6) "stdout" ["mode":"php\io\MiscStream":private]=> string(1) "w" ["path":"php\io\Stream":private]=> NULL ["mode":"php\io\Stream":private]=> NULL } object(php\io\MiscStream)#875016237 (4) { ["path":"php\io\MiscStream":private]=> string(6) "stderr" ["mode":"php\io\MiscStream":private]=> string(1) "w" ["path":"php\io\Stream":private]=> NULL ["mode":"php\io\Stream":private]=> NULL }The buffered I/O streams can just be linked to stdin and stdout, like they normally are on PHP CLI.