3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public function _($foo) { return $foo; } } class T extends Base { public function __invoke($foo) { return $this->_($foo); } } $mem = memory_get_usage(); $timestamp = microtime(true); $t = new T(); for ($i = 0; $i < 10000; $i++) { $t($i); } $timestampAfter = microtime(true); $memDiff = memory_get_usage() - $mem; $timeDiff = $timestampAfter-$timestamp; var_dump($memDiff, $timeDiff);

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.4.00.0120.00614.83
7.3.120.0050.01314.82
7.3.110.0070.00714.73
7.3.100.0030.00715.02
7.3.90.0090.00614.86
7.3.80.0000.01314.75
7.3.70.0050.00514.55
7.3.60.0060.00614.72
7.3.50.0090.00314.74
7.3.40.0040.01114.47
7.3.30.0030.01314.75
7.3.20.0000.01216.85
7.3.10.0030.01616.64
7.3.00.0040.01416.62
7.2.250.0070.01314.96
7.2.240.0100.01014.86
7.2.230.0000.01614.96
7.2.220.0000.01614.84
7.2.210.0030.01414.97
7.2.200.0000.01114.89
7.2.190.0030.00915.02
7.2.180.0000.01214.99
7.2.170.0070.01014.94
7.2.00.0060.00919.43
7.1.330.0100.01015.98
7.1.320.0040.01215.92
7.1.310.0090.00615.76
7.1.300.0000.01415.56
7.1.290.0060.00615.93
7.1.280.0110.00715.52
7.1.270.0030.00915.93
7.1.260.0040.01515.78
7.1.70.0050.00217.33
7.1.60.0030.02119.25
7.1.50.0000.01416.95
7.1.00.0070.06722.33
7.0.200.0000.01216.79
7.0.140.0100.07022.00
7.0.120.0070.07022.17
7.0.60.0170.07319.83
7.0.50.0070.04017.72
7.0.40.0070.09020.14
7.0.30.0230.05720.21
7.0.20.0470.06320.10
7.0.10.0230.05320.24
7.0.00.0030.05720.06
5.6.280.0030.07720.77
5.6.210.0070.05020.51
5.6.200.0000.04718.12
5.6.190.0030.04720.64
5.6.180.0400.05020.45
5.6.170.0200.04320.71
5.6.160.0070.09020.50
5.6.150.0130.05018.21
5.6.140.0030.08018.18
5.6.130.0070.04318.14
5.6.120.0000.06021.05
5.6.110.0130.04021.12
5.6.100.0070.05321.04
5.6.90.0070.04321.13
5.6.80.0170.04720.38
5.6.70.0100.08320.52
5.5.350.0300.06020.31
5.5.340.0100.08318.08
5.5.330.0070.06320.42
5.5.320.0230.07720.43
5.5.310.0300.06720.35
5.5.300.0030.08017.97
5.5.290.0070.08017.97
5.5.280.0130.07720.81
5.5.270.0000.04720.80
5.5.260.0030.07320.85
5.5.250.0100.08020.66
5.5.240.0100.08020.26
5.4.450.0070.07319.52
5.4.440.0030.07319.48
5.4.430.0070.08319.40
5.4.420.0100.06319.56
5.4.410.0100.04719.44
5.4.400.0200.06719.26
5.4.390.0130.07719.15
5.4.380.0100.03718.88
5.4.370.0170.07019.20
5.4.360.0030.04018.92
5.4.350.0030.04319.21
5.4.340.0000.05019.24
5.4.320.0030.04019.14
5.4.310.0100.03018.96
5.4.300.0130.03019.20
5.4.290.0070.03719.00
5.4.280.0070.03719.23
5.4.270.0000.04019.14
5.4.260.0000.04019.00
5.4.250.0070.03318.96
5.4.240.0000.04019.17
5.4.230.0000.04018.86
5.4.220.0100.03319.13
5.4.210.0000.04019.11
5.4.200.0070.03319.00
5.4.190.0070.04018.91
5.4.180.0000.04018.84
5.4.170.0070.03719.11
5.4.160.0070.04718.83
5.4.150.0030.04719.14
5.4.140.0100.07016.55
5.4.130.0000.07716.36
5.4.120.0100.07016.50
5.4.110.0070.08016.43
5.4.100.0030.07716.45
5.4.90.0100.07316.52
5.4.80.0070.05316.43
5.4.70.0000.06016.48
5.4.60.0170.03316.40
5.4.50.0030.06016.27
5.4.40.0100.06716.39
5.4.30.0100.06016.25
5.4.20.0000.08016.40
5.4.10.0100.07716.34
5.4.00.0230.03015.74
5.3.290.0030.04314.71
5.3.280.0000.04014.63
5.3.270.0070.03314.66
5.3.260.0100.07714.64
5.3.250.0070.06314.61
5.3.240.0100.08014.64
5.3.230.0070.06714.63
5.3.220.0100.07314.58
5.3.210.0000.08014.58
5.3.200.0030.04314.57
5.3.190.0030.05014.63
5.3.180.0130.07314.57
5.3.170.0070.04714.59
5.3.160.0100.06714.62
5.3.150.0070.07714.59
5.3.140.0070.08014.72
5.3.130.0100.03314.57
5.3.120.0070.06714.58
5.3.110.0030.05314.56
5.3.100.0000.04314.04
5.3.90.0100.05714.08
5.3.80.0030.04013.99
5.3.70.0030.04314.08
5.3.60.0030.08314.02
5.3.50.0130.07314.10
5.3.40.0070.08014.00
5.3.30.0030.08013.95
5.3.20.0000.04713.85
5.3.10.0030.07713.58
5.3.00.0030.07313.66
5.2.170.0070.03311.11
5.2.160.0000.03711.11
5.2.150.0000.06711.05
5.2.140.0030.06311.20
5.2.130.0030.06011.08
5.2.120.0030.04711.19
5.2.110.0100.06011.14
5.2.100.0070.06011.13
5.2.90.0000.04711.05
5.2.80.0000.04011.06
5.2.70.0000.03311.07
5.2.60.0070.03711.02
5.2.50.0070.05311.18
5.2.40.0030.06311.16
5.2.30.0130.05311.02
5.2.20.0000.04310.85
5.2.10.0030.03710.91
5.2.00.0030.03310.79
5.1.60.0030.0509.95
5.1.50.0000.0309.91
5.1.40.0030.0339.95
5.1.30.0030.03710.34
5.1.20.0070.04010.28
5.1.10.0070.06010.06
5.1.00.0100.03710.06
5.0.50.0000.0278.61
5.0.40.0000.0208.43
5.0.30.0030.0578.29
5.0.20.0000.0378.29
5.0.10.0030.0278.29
5.0.00.0030.0378.29
4.4.90.0000.0178.29
4.4.80.0030.0278.29
4.4.70.0030.0238.29
4.4.60.0030.0338.29
4.4.50.0000.0308.29
4.4.40.0000.0278.29
4.4.30.0030.0138.29
4.4.20.0070.0178.29
4.4.10.0000.0238.29
4.4.00.0000.0278.29
4.3.110.0000.0178.29
4.3.100.0070.0208.29
4.3.90.0000.0338.29
4.3.80.0000.0538.29
4.3.70.0030.0238.29
4.3.60.0030.0338.29
4.3.50.0030.0338.29
4.3.40.0030.0508.29
4.3.30.0030.0338.29
4.3.20.0000.0408.29
4.3.10.0030.0308.29
4.3.00.0000.0378.29

preferences:
44.55 ms | 400 KiB | 5 Q