3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'bar'; } $foo = new Foo; $rounds = 1000000; $start = microtime(true); for($i=0; $i<$rounds; $i++) { $var = $foo->bar; } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); $refl = new ReflectionProperty('Foo', 'bar'); for($i=0; $i<$rounds; $i++) { $var = $refl->getValue(); } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); for($i=0; $i<$rounds; $i++) { $var = (new ReflectionProperty('Foo', 'bar'))->getValue(); } echo (microtime(true) - $start);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.00.0070.03318.96
7.1.70.0070.03116.81
7.1.60.0070.05419.32
7.1.50.0070.02116.70
7.0.200.0040.02516.95

preferences:
33.8 ms | 401 KiB | 5 Q