3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Initial Configuration class SomeClass { function f() { } } $i = 0; //fix for Notice: Undefined variable i error // Test Source function Test6_2() { //global $aHash; //we don't need that in this test global $i; //fix for Notice: Undefined variable i error /* The Test */ $t = microtime(true); while($i < 1000) { $obj =& new SomeClass(); ++$i; } usleep(100); //sleep or you'll return 0 microseconds at every run!!! return (microtime(true) - $t); }
Output for 8.0.0 - 8.0.20, 8.1.0 - 8.1.7
Parse error: syntax error, unexpected token "new" in /in/AKH8r on line 18
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.30
Parse error: syntax error, unexpected 'new' (T_NEW) in /in/AKH8r on line 18
Process exited with code 255.
Output for 5.6.0 - 5.6.40
Deprecated: Assigning the return value of new by reference is deprecated in /in/AKH8r on line 18

preferences:
346.12 ms | 1395 KiB | 243 Q