3v4l.org

run code in 300+ PHP versions simultaneously
<?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);
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.

preferences:
158.37 ms | 1395 KiB | 36 Q