3v4l.org

run code in 300+ PHP versions simultaneously
<?php $GLOBALS['_start_time'] = microtime(true); echo "*** Testing fgetc() : usage variations ***\n"; echo "-- Testing fgetc() with files opened with different read modes --\n"; $file_modes = array( "a+", "a+b", "a+t","x+", "x+b", "x+t","w+", "w+b", "w+t" ); $filename = __DIR__."non-exist.tmp"; function &test() : string {} function &gen() { yield $str[0]; } try { $str = "foo"; } catch (Error $e) { } var_dump($filename); var_dump($str); $x1=$filename; $x2=$str; var_dump(strcmp($x1,$x2));

preferences:
30.19 ms | 406 KiB | 5 Q