3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $arr = array("test"); function bar( $str ){ var_dump(self::arr[0]); if( is_callable( self::arr[0],true ) ){ {self::arr[0]}( $str ); } } static function test($var) { echo "Testing: $var\n"; } } (new Foo)->bar("bla");

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.0230.08020.24
7.0.10.0170.06020.12
7.0.00.0070.08720.23
5.6.170.0300.04020.55
5.6.160.0130.08320.55
5.6.150.0000.08018.16
5.6.140.0070.03718.28
5.6.130.0030.04018.22
5.6.120.0070.05021.15
5.6.110.0000.09720.96
5.6.100.0070.06320.95
5.6.90.0100.03321.13
5.6.80.0070.08320.38
5.5.310.0200.09020.35
5.5.300.0130.03017.95
5.5.290.0030.08017.99
5.5.280.0000.04320.88
5.5.270.0100.04320.76
5.5.260.0130.07720.89
5.5.250.0100.06320.69
5.5.240.0270.07320.12

preferences:
141.17 ms | 1394 KiB | 7 Q