3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 0; $bar = function() use (&$foo) { return ++ $foo; }; $a = $bar(); $b = $bar(); $c = $bar(); var_dump($a ?? $b ?? $c, $foo );

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.70.0090.01216.75
8.3.60.0070.01016.75
8.3.50.0110.00921.26
8.3.40.0000.01518.98
8.3.30.0070.00718.67
8.3.20.0070.00020.20
8.3.10.0000.00721.72
8.3.00.0000.00823.36
8.2.180.0120.00918.17
8.2.170.0130.00618.96
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0050.00324.66
8.2.130.0080.00019.89
8.2.120.0040.00426.35
8.2.110.0000.01022.07
8.2.100.0040.00818.05
8.2.90.0000.00819.17
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0040.00420.50
8.2.30.0040.00420.58
8.2.20.0070.00017.81
8.2.10.0000.00718.13
8.2.00.0040.00418.00
8.1.280.0040.01125.92
8.1.270.0060.00323.84
8.1.260.0030.00528.09
8.1.250.0000.00828.09
8.1.240.0080.00023.92
8.1.230.0110.00019.15
8.1.220.0000.00817.77
8.1.210.0070.00318.77
8.1.200.0030.00617.13
8.1.190.0050.00317.11
8.1.180.0040.00418.10
8.1.170.0000.00818.61
8.1.160.0000.00720.64
8.1.150.0040.00418.89
8.1.140.0000.00819.50
8.1.130.0050.00217.75
8.1.120.0000.00717.43
8.1.110.0030.00517.52
8.1.100.0000.00717.35
8.1.90.0070.00017.45
8.1.80.0000.00817.50
8.1.70.0030.00317.37
8.1.60.0040.00417.59
8.1.50.0000.00817.50
8.1.40.0040.00417.54
8.1.30.0040.00417.50
8.1.20.0040.00417.66
8.1.10.0000.00817.46
8.1.00.0030.00517.48
8.0.300.0000.00818.77
8.0.290.0050.00316.75
8.0.280.0040.00418.51
8.0.270.0000.00717.30
8.0.260.0060.00017.16
8.0.250.0060.00016.86
8.0.240.0030.00317.02
8.0.230.0000.00716.86
8.0.220.0030.00616.91
8.0.210.0070.00016.92
8.0.200.0000.00616.96
8.0.190.0050.00316.91
8.0.180.0000.00816.84
8.0.170.0050.00516.96
8.0.160.0000.00816.91
8.0.150.0040.00416.83
8.0.140.0040.00416.88
8.0.130.0030.00313.29
8.0.120.0040.00416.76
8.0.110.0050.00216.86
8.0.100.0030.00616.88
8.0.90.0040.00416.93
8.0.80.0090.00616.92
8.0.70.0060.00316.77
8.0.60.0070.00016.87
8.0.50.0000.00716.86
8.0.30.0120.00617.09
8.0.20.0120.01017.40
8.0.10.0000.00716.97
8.0.00.0110.00916.76
7.4.330.0060.00016.71
7.4.320.0060.00016.61
7.4.300.0040.00416.58
7.4.290.0030.00316.47
7.4.280.0070.00416.55
7.4.270.0000.00716.42
7.4.260.0030.00816.49
7.4.250.0070.00016.42
7.4.240.0020.00516.49
7.4.230.0000.00716.52
7.4.220.0080.01116.63
7.4.210.0040.01016.60
7.4.200.0080.00016.58
7.4.160.0070.01016.43
7.4.150.0170.00017.40
7.4.140.0120.00817.86
7.4.130.0090.00816.39
7.4.120.0080.01016.47
7.4.110.0100.00816.31
7.4.100.0060.01216.51
7.4.90.0030.01316.39
7.4.80.0140.00319.39
7.4.70.0070.01416.45
7.4.60.0030.01516.55
7.4.50.0070.01016.74
7.4.40.0090.01516.41
7.4.30.0180.00016.62
7.4.00.0050.01114.69
7.3.330.0050.00013.27
7.3.320.0050.00013.36
7.3.310.0050.00216.29
7.3.300.0000.00716.32
7.3.290.0030.00316.31
7.3.280.0100.00716.28
7.3.270.0100.01017.40
7.3.260.0100.00716.58
7.3.250.0100.01116.49
7.3.240.0130.00816.45
7.3.230.0130.00416.39
7.3.210.0130.00316.46
7.3.200.0110.00619.39
7.3.190.0140.00916.64
7.3.180.0130.00316.37
7.3.170.0130.01016.37
7.3.160.0060.00916.51
7.3.120.0120.00314.54
7.3.110.0090.00915.00
7.3.100.0070.00714.88
7.3.90.0080.00414.59
7.3.80.0100.00014.68
7.3.70.0030.01314.71
7.3.60.0070.00714.92
7.3.50.0030.01214.70
7.3.40.0090.00614.68
7.3.30.0070.00714.66
7.3.20.0030.00916.60
7.3.10.0030.00916.39
7.3.00.0040.01216.70
7.2.330.0030.01316.54
7.2.320.0030.01316.66
7.2.310.0130.00416.86
7.2.300.0160.00616.63
7.2.290.0090.01316.48
7.2.250.0080.00615.12
7.2.240.0120.00915.17
7.2.230.0040.01115.15
7.2.220.0070.00415.03
7.2.210.0030.00915.02
7.2.200.0090.00315.03
7.2.190.0000.01214.89
7.2.180.0060.00614.97
7.2.170.0070.01015.18
7.2.60.0040.00816.73
7.2.00.0040.00719.15
7.1.330.0070.01015.54
7.1.320.0060.00315.98
7.1.310.0030.01015.97
7.1.300.0000.01315.82
7.1.290.0040.01115.86
7.1.280.0040.01115.98
7.1.270.0100.00315.74
7.1.260.0070.00715.91
7.1.200.0030.00615.59
7.1.100.0070.00418.18
7.1.70.0000.00817.34
7.1.60.0060.00619.21
7.1.50.0160.00616.70
7.1.00.0100.07022.31
7.0.200.0100.00016.85
7.0.60.0070.06321.75
7.0.50.0070.04317.88
7.0.40.0070.04020.21
7.0.30.0230.08320.07
7.0.20.0370.06020.09
7.0.10.0030.04320.23
7.0.00.0000.09020.06
5.6.280.0100.04720.91
5.6.210.0130.07020.65
5.6.200.0070.07318.27
5.6.190.0100.07720.61
5.6.180.0330.07720.57
5.6.170.0330.07020.41
5.6.160.0030.04020.50
5.6.150.0200.04718.29
5.6.140.0030.05718.19
5.6.130.0030.08318.24
5.6.120.0070.05321.02
5.6.110.0030.04021.09
5.6.100.0100.03320.96
5.6.90.0100.08020.96
5.6.80.0100.07720.41
5.5.350.0200.03320.41
5.5.340.0100.07717.98
5.5.330.0030.07720.40
5.5.320.0500.04320.24
5.5.310.0170.08020.51
5.5.300.0130.03017.94
5.5.290.0070.08018.00
5.5.280.0170.07320.64
5.5.270.0130.08020.87
5.5.260.0230.06020.73
5.5.250.0030.08720.69
5.5.240.0200.07320.19

preferences:
41.24 ms | 401 KiB | 5 Q