3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($var) { echo "in function ",__FUNCTION__,"\n"; echo "Test: \$var == $var\n"; } class foo { $arr = array("test"); static function hello(){ echo "hi\n"; } function bar() { $this->arr[0]('some value'); } } $a = new foo(); $a->bar(); foo::hello(); var_dump(method_exists($a,'test')); var_dump(method_exists('foo','hello'));

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.0.20.0300.07720.09
7.0.10.0030.04320.07
7.0.00.0070.05320.25
5.6.170.0300.08020.56
5.6.160.0070.06020.50
5.6.150.0030.05718.22
5.6.140.0100.08018.27
5.6.130.0070.08318.17
5.6.120.0030.04021.04
5.6.110.0100.06021.12
5.6.100.0130.05720.98
5.6.90.0170.05720.98
5.6.80.0030.08020.52
5.5.310.0370.08020.23
5.5.300.0000.04017.92
5.5.290.0070.04718.07
5.5.280.0030.09720.77
5.5.270.0030.08720.73
5.5.260.0030.04720.87
5.5.250.0100.07320.70
5.5.240.0170.05320.05

preferences:
139.82 ms | 1398 KiB | 7 Q