3v4l.org

run code in 200+ php & hhvm versions
<?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 7.0.0 - 7.4.0beta1
Parse error: syntax error, unexpected 'new' (T_NEW) in /in/AKH8r on line 18
Process exited with code 255.
Output for 4.3.0 - 4.4.9, hhvm-3.10.1 - 3.22.0
Output for 5.3.0 - 5.6.40
Deprecated: Assigning the return value of new by reference is deprecated in /in/AKH8r on line 18
Output for 5.0.0 - 5.2.17
Strict Standards: Assigning the return value of new by reference is deprecated in /in/AKH8r on line 18