3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public function _($foo) { return $foo; } } $mem = memory_get_usage(); $timestamp = microtime(true); $base = new Base; $t = function($foo) use ($base) { return $base->_($foo); }; 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.0070.01415.01
7.3.120.0030.01514.76
7.3.110.0130.00414.84
7.3.100.0050.01214.73
7.3.90.0040.00914.85
7.3.80.0050.01114.80
7.3.70.0060.00914.72
7.3.60.0090.00714.87
7.3.50.0090.00714.72
7.3.40.0060.00414.74
7.3.30.0030.01314.90
7.3.20.0050.01116.68
7.3.10.0070.00616.65
7.3.00.0040.01216.63
7.2.250.0050.01215.11
7.2.240.0110.01015.15
7.2.230.0090.00615.20
7.2.220.0050.01014.96
7.2.210.0110.00515.07
7.2.200.0050.01115.14
7.2.190.0050.01214.92
7.2.180.0070.01214.80
7.2.170.0020.01014.86
7.2.00.0040.01119.37
7.1.330.0060.01015.86
7.1.320.0090.00915.74
7.1.310.0080.00815.81
7.1.300.0050.01215.79
7.1.290.0110.00515.69
7.1.280.0050.01015.73
7.1.270.0080.00815.79
7.1.260.0080.01015.83
7.1.70.0000.00817.30
7.1.60.0100.01619.25
7.1.50.0090.01216.98
7.1.00.0000.07022.36
7.0.200.0030.00616.58
7.0.140.0030.07722.07
7.0.120.0100.05722.17
7.0.60.0100.08320.05
7.0.50.0000.04717.88
7.0.40.0100.08720.27
7.0.30.0300.04320.08
7.0.20.0300.05320.10
7.0.10.0270.07320.25
7.0.00.0030.09020.30
5.6.280.0070.07321.12
5.6.210.0070.09020.68
5.6.200.0000.04718.28
5.6.190.0070.08720.47
5.6.180.0370.07320.59
5.6.170.0170.04720.50
5.6.160.0000.09320.55
5.6.150.0100.03718.25
5.6.140.0070.06318.19
5.6.130.0070.04318.18
5.6.120.0100.06321.12
5.6.110.0100.09021.03
5.6.100.0070.08721.04
5.6.90.0100.08321.10
5.6.80.0130.05020.29
5.6.70.3930.04320.37
5.5.350.0200.04720.35
5.5.340.0100.08317.98
5.5.330.0100.08320.45
5.5.320.0170.07720.41
5.5.310.0270.08020.41
5.5.300.0070.08017.98
5.5.290.0070.07017.99
5.5.280.0130.08020.77
5.5.270.0100.04020.64
5.5.260.0030.05720.77
5.5.250.0130.08720.75
5.5.240.0070.08020.26
5.4.450.0130.07719.18
5.4.440.0070.06719.56
5.4.430.0170.05019.32
5.4.420.0100.08319.17
5.4.410.0030.04719.07
5.4.400.0100.08019.12
5.4.390.0130.07019.15
5.4.380.0070.07719.24
5.4.370.0070.05018.85
5.4.360.0100.04719.07
5.4.350.0130.07719.15
5.4.340.0070.07019.16
5.4.320.0030.07719.00
5.4.310.0030.04718.87
5.4.300.0070.04718.97
5.4.290.0100.06318.97
5.4.280.0030.05318.98
5.4.270.0070.08319.20
5.4.260.0000.05018.85
5.4.250.0000.05319.20
5.4.240.0100.08018.85
5.4.230.0070.07318.96
5.4.220.0100.07719.14
5.4.210.0070.06318.85
5.4.200.0130.05718.91
5.4.190.0070.08018.85
5.4.180.0030.05318.84
5.4.170.0070.06318.84
5.4.160.0100.06718.85
5.4.150.0000.06319.19
5.4.140.0200.06716.52
5.4.130.0070.06016.30
5.4.120.0030.06016.50
5.4.110.0030.06016.33
5.4.100.0070.07716.36
5.4.90.0070.08016.27
5.4.80.0130.07316.32
5.4.70.0030.06316.39
5.4.60.0100.06316.35
5.4.50.0070.07016.32
5.4.40.0130.06716.40
5.4.30.0130.06716.39
5.4.20.0130.06016.39
5.4.10.0130.07016.40
5.4.00.0100.04315.87
5.3.290.0030.04014.71
5.3.280.0100.06714.65
5.3.270.0100.08014.61
5.3.260.0070.08314.61
5.3.250.0070.05714.64
5.3.240.0130.07714.61
5.3.230.0100.07314.74
5.3.220.0200.06714.60
5.3.210.0230.06714.57
5.3.200.0070.08014.57
5.3.190.0030.08014.58
5.3.180.0030.06714.56
5.3.170.0030.04314.59
5.3.160.0000.05314.60
5.3.150.0070.06714.59
5.3.140.0100.07714.59
5.3.130.0000.04314.59
5.3.120.0130.07714.44
5.3.110.0070.05314.59
5.3.100.0070.08014.03
5.3.90.0070.04314.08
5.3.80.0030.04014.05
5.3.70.0070.07014.04
5.3.60.0170.06014.00
5.3.50.0000.08714.03
5.3.40.0070.03713.95
5.3.30.0030.03713.94
5.3.20.0000.04313.75
5.3.10.0070.04013.69
5.3.00.0030.03713.72
5.2.170.0100.05311.15
5.2.160.0030.05011.11
5.2.150.0000.03311.21
5.2.140.0030.03011.18
5.2.130.0000.03011.16
5.2.120.0000.03011.07
5.2.110.0000.03011.10
5.2.100.0070.03011.02
5.2.90.0000.03011.03
5.2.80.0030.02711.09
5.2.70.0000.03711.24
5.2.60.0000.03011.21
5.2.50.0070.02311.09
5.2.40.0030.02711.07
5.2.30.0070.02310.99
5.2.20.0070.02311.01
5.2.10.0030.04710.99
5.2.00.0070.05310.99
5.1.60.0000.03010.99
5.1.50.0000.02710.99
5.1.40.0070.02010.99
5.1.30.0000.02710.99
5.1.20.0030.02310.99
5.1.10.0000.02710.99
5.1.00.0030.02310.99
5.0.50.0070.01710.99
5.0.40.0000.02010.99
5.0.30.0000.03010.99
5.0.20.0000.02010.99
5.0.10.0030.02010.99
5.0.00.0000.03010.99
4.4.90.0100.00710.99
4.4.80.0000.01310.99
4.4.70.0070.02710.99
4.4.60.0070.03010.99
4.4.50.0030.01310.99
4.4.40.0070.02710.99
4.4.30.0000.02010.99
4.4.20.0030.01310.99
4.4.10.0000.01710.99
4.4.00.0000.02310.99
4.3.110.0030.01310.99
4.3.100.0000.01710.99
4.3.90.0070.01010.99
4.3.80.0030.02010.99
4.3.70.0000.01710.99
4.3.60.0000.01710.99
4.3.50.0030.01310.99
4.3.40.0030.02010.99
4.3.30.0030.01010.99
4.3.20.0030.01310.99
4.3.10.0000.01310.99
4.3.00.0030.01310.99

preferences:
45.72 ms | 401 KiB | 5 Q