3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new class() { public $callCounters = []; public function call($index) { if (!isset($this->callCounters[$index])) { $this->callCounters[$index] = 0; } ++$this->callCounters[$index]; } }; $indexes = range('a','e'); foreach($indexes as $index) { $r = rand(1,4); for($i = 0; $i <= $r; ++$i) { $x->call($index); } } var_dump($x->callCounters);

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.10.0030.01616.46
7.4.00.0070.01315.50
7.3.130.0070.01116.61
7.3.120.0090.00915.58
7.3.110.0080.01015.70
7.3.100.0070.00715.59
7.3.90.0060.00815.51
7.3.80.0050.01015.53
7.3.70.0050.01015.66
7.3.60.0080.01015.59
7.3.50.0060.00815.59
7.3.40.0060.00615.35
7.3.30.0120.00315.52
7.3.20.0100.00317.44
7.3.10.0080.00917.32
7.3.00.0080.00817.32
7.2.260.0090.00616.67
7.2.250.0090.01115.87
7.2.240.0070.01215.69
7.2.230.0050.01216.01
7.2.220.0090.00715.74
7.2.210.0060.00615.76
7.2.200.0060.01115.88
7.2.190.0030.01315.83
7.2.180.0070.01015.75
7.2.170.0060.00915.82
7.2.160.0120.00616.50
7.2.150.0040.01118.26
7.2.140.0060.00718.38
7.2.130.0120.00618.30
7.2.120.0030.01018.35
7.2.110.0100.00318.36
7.2.100.0070.00718.57
7.2.90.0030.01218.41
7.2.80.0040.01218.33
7.2.70.0090.00618.34
7.2.60.0060.00917.74
7.2.50.0090.00618.41
7.2.40.0150.00318.52
7.2.30.0100.00718.43
7.2.20.0040.01218.30
7.2.10.0070.01018.18
7.2.00.0060.01018.88
7.1.330.0020.01316.73
7.1.320.0060.00816.66
7.1.310.0070.00816.63
7.1.300.0030.01216.42
7.1.290.0110.00716.59
7.1.280.0070.00716.67
7.1.270.0110.00616.45
7.1.260.0050.00816.56
7.1.250.0080.00317.18
7.1.240.0030.01017.19
7.1.230.0040.01217.16
7.1.220.0030.01217.29
7.1.210.0100.00617.37
7.1.200.0070.01017.16
7.1.190.0040.01117.43
7.1.180.0030.01317.23
7.1.170.0000.01417.18
7.1.160.0040.01117.41
7.1.150.0090.00617.32
7.1.140.0040.00717.25
7.1.130.0120.00017.25
7.1.120.0120.00317.28
7.1.110.0030.01417.41
7.1.100.0050.00917.77
7.1.90.0040.00817.29
7.1.80.0060.01017.38
7.1.70.0000.00917.15
7.1.60.0850.01225.29
7.1.50.1210.01125.21
7.1.40.1000.01524.92
7.1.30.1010.01325.07
7.1.20.0820.01025.12
7.1.10.0720.01016.01
7.1.00.1010.00716.08
7.0.330.0060.00616.91
7.0.320.0130.00316.80
7.0.310.0100.00016.94
7.0.300.0060.00916.80
7.0.290.0090.00617.01
7.0.280.0060.00916.96
7.0.270.0060.01016.97
7.0.260.0060.00616.90
7.0.250.0040.00716.89
7.0.240.0040.01116.84
7.0.230.0030.01216.92
7.0.220.0110.00417.04
7.0.210.0000.01616.98
7.0.200.0750.00916.06
7.0.190.0920.01216.04
7.0.180.0820.01415.65
7.0.170.0960.00715.71
7.0.160.1100.01015.74
7.0.150.0850.01015.66
7.0.140.0950.01115.77
7.0.130.1090.00615.87
7.0.120.1190.00915.79
7.0.110.0760.00815.68
7.0.100.0780.01015.78
7.0.90.0980.01215.75
7.0.80.1170.01015.79
7.0.70.1130.01015.86
7.0.60.1170.01515.65
7.0.50.1170.00715.64
7.0.40.1030.01314.71
7.0.30.0740.00714.78
7.0.20.0900.00814.82
7.0.10.0960.00714.68
7.0.00.0920.00814.77
5.6.400.0070.00715.35
5.6.390.0000.00915.62
5.6.380.0090.00615.50
5.6.370.0090.00615.45
5.6.360.0060.00615.71
5.6.350.0000.01515.38
5.6.340.0070.01015.80
5.6.330.0100.00315.70
5.6.320.0060.00915.60
5.6.310.0070.00715.73
5.6.300.0090.00915.73
5.6.290.0000.01415.57
5.6.280.0120.00315.54
5.6.270.0130.00315.55
5.6.260.0060.00615.40
5.6.250.0040.01115.55
5.6.240.0040.01215.51
5.6.230.0100.00715.47
5.6.220.0060.00315.71
5.6.210.0070.00715.52
5.6.200.0000.01415.44
5.6.190.0030.01315.33
5.6.180.0070.00715.48
5.6.170.0100.00615.23
5.6.160.0030.01015.39
5.6.150.0040.00715.43
5.6.140.0140.00015.71
5.6.130.0000.00915.64
5.6.120.0090.00015.54
5.6.110.0060.00615.36
5.6.100.0060.00615.54
5.6.90.0030.00615.55
5.6.80.0030.00915.61
5.6.70.0080.00815.32
5.6.60.0060.00315.48
5.6.50.0110.00315.34
5.6.40.0070.01015.50
5.6.30.0030.00615.40
5.6.20.0070.00415.55
5.6.10.0070.00315.37
5.6.00.0030.01115.33

preferences:
64.79 ms | 401 KiB | 5 Q