3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public static $callCounters = []; public function call($index) { if (!isset(self::$callCounters[$index])) { self::$callCounters[$index] = 0; } ++self::$callCounters[$index]; } }; $x = new test(); $indexes = range('a','e'); foreach($indexes as $index) { for($i = 0; $i <= 2; ++$i) { $x->call($index); } } var_dump(test::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)
8.3.60.0120.00618.55
8.3.50.0030.01316.61
8.3.40.0070.00718.79
8.3.30.0080.00618.79
8.3.20.0080.00020.94
8.3.10.0040.00421.73
8.3.00.0040.00419.54
8.2.180.0140.00418.63
8.2.170.0060.00922.96
8.2.160.0160.00020.35
8.2.150.0000.00825.66
8.2.140.0030.00624.66
8.2.130.0000.00726.16
8.2.120.0040.00420.88
8.2.110.0030.00619.45
8.2.100.0110.00017.84
8.2.90.0040.00418.34
8.2.80.0030.00617.97
8.2.70.0060.00317.93
8.2.60.0030.00618.16
8.2.50.0040.00418.10
8.2.40.0070.00019.30
8.2.30.0040.00418.13
8.2.20.0040.00418.13
8.2.10.0030.00518.14
8.2.00.0050.00218.00
8.1.280.0120.00425.92
8.1.270.0040.00422.19
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00622.45
8.1.230.0100.00021.10
8.1.220.0040.00417.80
8.1.210.0030.00618.96
8.1.200.0060.00317.35
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0050.00318.51
8.1.160.0040.00418.89
8.1.150.0030.00520.59
8.1.140.0000.00721.29
8.1.130.0040.00418.80
8.1.120.0060.00317.49
8.1.110.0000.00717.36
8.1.100.0040.00417.48
8.1.90.0040.00417.47
8.1.80.0050.00217.36
8.1.70.0070.00017.39
8.1.60.0040.00417.54
8.1.50.0030.00517.50
8.1.40.0080.00317.56
8.1.30.0080.00017.66
8.1.20.0000.00817.63
8.1.10.0060.00617.47
8.1.00.0040.00417.36
8.0.300.0070.00019.98
8.0.290.0000.00916.88
8.0.280.0030.00318.39
8.0.270.0030.00317.13
8.0.260.0030.00316.88
8.0.250.0030.00317.05
8.0.240.0050.00317.04
8.0.230.0030.00316.99
8.0.220.0050.00316.82
8.0.210.0030.00516.90
8.0.200.0000.00616.92
8.0.190.0040.00417.06
8.0.180.0030.00616.87
8.0.170.0060.00316.98
8.0.160.0050.00316.99
8.0.150.0070.00016.90
8.0.140.0040.00416.89
8.0.130.0000.00713.37
8.0.120.0040.00416.87
8.0.110.0040.00416.85
8.0.100.0040.00416.94
8.0.90.0040.00417.00
8.0.80.0130.00616.89
8.0.70.0000.00816.82
8.0.60.0070.00016.75
8.0.50.0020.00516.81
8.0.30.0100.00617.08
8.0.20.0130.00717.40
8.0.10.0040.00417.01
8.0.00.0140.00416.95
7.4.330.0000.00515.55
7.4.320.0030.00316.54
7.4.300.0000.00616.41
7.4.290.0000.00716.55
7.4.280.0000.00816.52
7.4.270.0020.00516.42
7.4.260.0050.00316.44
7.4.250.0040.00416.50
7.4.240.0030.00616.60
7.4.230.0050.00216.59
7.4.220.0130.00316.70
7.4.210.0080.00916.54
7.4.200.0030.00316.32
7.4.160.0090.00616.55
7.4.150.0110.00717.40
7.4.140.0120.00617.86
7.4.130.0130.00316.55
7.4.120.0090.01216.50
7.4.110.0140.00716.73
7.4.100.0000.01716.57
7.4.90.0080.00816.54
7.4.80.0100.00619.39
7.4.70.0030.01416.45
7.4.60.0070.01016.71
7.4.50.0120.00316.43
7.4.40.0130.00316.38
7.4.30.0100.01316.49
7.4.00.0030.01414.70
7.3.330.0020.00213.38
7.3.320.0050.00013.41
7.3.310.0030.00316.19
7.3.300.0000.00716.43
7.3.290.0000.00716.38
7.3.280.0080.00816.42
7.3.270.0070.01017.40
7.3.260.0120.00416.54
7.3.250.0080.01016.45
7.3.240.0030.01416.39
7.3.230.0110.00716.64
7.3.210.0030.01316.39
7.3.200.0090.01216.52
7.3.190.0120.00316.51
7.3.180.0000.01616.63
7.3.170.0060.01016.63
7.3.160.0110.00716.44
7.2.330.0110.00816.48
7.2.320.0090.00916.52
7.2.310.0130.00316.79
7.2.300.0130.01016.54
7.2.290.0090.00616.55
7.2.60.0070.00716.91
7.2.00.0100.00719.26
7.1.200.0030.00715.86
7.1.100.0030.01317.84
7.1.70.0000.00717.23
7.1.60.3400.01733.16
7.1.50.3370.01033.17
7.1.40.3430.01732.69
7.1.30.4130.01032.60
7.1.20.2630.01032.83
7.1.10.2670.01014.67
7.1.00.1630.01314.69
7.0.200.4370.01015.07
7.0.190.4300.01314.76
7.0.180.3730.02014.25
7.0.170.3700.00314.24
7.0.160.2870.01014.55
7.0.150.2400.01314.38
7.0.140.1900.00314.57
7.0.130.1630.02014.48
7.0.120.1570.01314.93
7.0.110.2830.01314.58
7.0.100.1670.01714.54
7.0.90.1570.01714.56
7.0.80.1770.01314.61
7.0.70.2030.02014.53
7.0.60.1870.01314.42
7.0.50.1530.01014.32
7.0.40.1400.00314.82
7.0.30.1370.01014.68
7.0.20.1870.01714.66
7.0.10.1870.01714.48
7.0.00.1430.01314.68

preferences:
58.62 ms | 400 KiB | 5 Q