- Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
- Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR), expecting identifier (T_STRING) in /in/09aXV on line 11
Process exited with code 255.
<?php
namespace Sample;
var_dump(is_resource(STDOUT));
function f1($f) {
fwrite($f, "1 called!\n");
}
function f2(\\resource $f) {
fwrite($f, "2 called!\n");
}
function f3(resource $f) {
fwrite($f, "3 called!\n");
}
f1(STDOUT);
f2(STDOUT);
f3(STDOUT);