3v4l.org

run code in 300+ PHP versions simultaneously
<?php class one{ public static $i =0; public function index($called_from = null){ if ( $called_from != 'myfunc') { return $this->myfunc(__FUNCTION__); } self::$i+= 1; echo self::$i: echo 'parent'; } public function myfunc($called_from){ return $this->index(__FUNCTION__); } } class two extends one{ function index($called_from = null){ if ( $called_from != 'myfunc') { return $this->myfunc(__FUNCTION__); } echo 'child'; } } $obj = new one; $obj->index();

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.1.70.0030.01617.07
7.1.60.0190.01334.73
7.1.50.0160.01934.41
7.1.40.0300.00034.45
7.1.30.0230.01334.11
7.1.20.0250.01834.48
7.1.10.0030.01416.57
7.1.00.0100.00716.63
7.0.200.0070.01216.31
7.0.190.0040.01116.63
7.0.180.0060.01216.09
7.0.170.0060.01315.85
7.0.160.0070.00716.11
7.0.150.0120.00816.30
7.0.140.0070.01616.31
7.0.130.0040.01116.41
7.0.120.0070.00916.41
7.0.110.0080.01216.22
7.0.100.0030.01516.08
7.0.90.0060.01516.29
7.0.80.0060.01216.13
7.0.70.0030.01216.29
7.0.60.0070.01015.75
7.0.50.0100.01016.28
7.0.40.0030.01616.14
7.0.30.0080.00916.42
7.0.20.0110.00716.33
7.0.10.0050.01116.32
7.0.00.0060.01716.23

preferences:
140.71 ms | 1394 KiB | 7 Q