3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test1($unset = false) { // PHP establishes an internal static var and binds // the local name 'bar' to it static $bar = 0; // unlink the name 'bar' from the internal static var unset($bar); // we can reuse $bar! $bar = " this is crazy "; echo $bar; // rebind 'bar' to the internal static var! static $bar; $bar++; echo $bar; } test1(); test1(); test1(); test1();

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.0140.00718.43
8.3.50.0100.00821.20
8.3.40.0140.00318.71
8.3.30.0070.00720.38
8.3.20.0040.00420.38
8.3.10.0050.00321.92
8.3.00.0080.00022.42
8.2.180.0070.00716.38
8.2.170.0110.00422.96
8.2.160.0040.01520.35
8.2.150.0030.00725.66
8.2.140.0040.00424.66
8.2.130.0070.01426.16
8.2.120.0080.00019.77
8.2.110.0040.00720.43
8.2.100.0000.01817.63
8.2.90.0060.00317.91
8.2.80.0030.00519.32
8.2.70.0050.00317.78
8.2.60.0000.00918.03
8.2.50.0000.00818.07
8.2.40.0040.00419.95
8.2.30.0040.00418.00
8.2.20.0040.00417.72
8.2.10.0040.00417.56
8.2.00.0000.00717.61
8.1.280.0040.01725.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.66
8.1.230.0110.00020.96
8.1.220.0050.00317.74
8.1.210.0090.00018.79
8.1.200.0060.00317.35
8.1.190.0000.00817.40
8.1.180.0060.00318.10
8.1.170.0100.00018.64
8.1.160.0050.00318.90
8.1.150.0000.00718.81
8.1.140.0000.00817.33
8.1.130.0000.00717.46
8.1.120.0040.00417.40
8.1.110.0040.00417.35
8.1.100.0000.00717.42
8.1.90.0050.00217.43
8.1.80.0040.00417.46
8.1.70.0030.00317.31
8.1.60.0000.00717.60
8.1.50.0040.00417.41
8.1.40.0060.00317.56
8.1.30.0050.00317.67
8.1.20.0000.00817.57
8.1.10.0060.00317.56
8.1.00.0040.00417.37
8.0.300.0000.00720.09
8.0.290.0080.00016.63
8.0.280.0030.00318.45
8.0.270.0000.00717.99
8.0.260.0000.00616.82
8.0.250.0040.00416.84
8.0.240.0040.00416.83
8.0.230.0000.00716.97
8.0.220.0030.00316.78
8.0.210.0050.00216.88
8.0.200.0000.00616.95
8.0.190.0030.00816.91
8.0.180.0040.00716.85
8.0.170.0080.00016.95
8.0.160.0050.00216.88
8.0.150.0000.00716.74
8.0.140.0040.00416.78
8.0.130.0000.00513.27
8.0.120.0060.00316.91
8.0.110.0050.00316.86
8.0.100.0070.00016.77
8.0.90.0070.00016.70
8.0.80.0070.01416.86
8.0.70.0020.00516.77
8.0.60.0000.00717.00
8.0.50.0000.00716.90
8.0.30.0110.00717.04
8.0.20.0110.00817.40
8.0.10.0000.00817.13
8.0.00.0110.00716.95
7.4.330.0050.00015.00
7.4.320.0060.00016.36
7.4.300.0060.00016.48
7.4.290.0030.00316.50
7.4.280.0040.00416.60
7.4.270.0000.00716.54
7.4.260.0070.00016.59
7.4.250.0030.00316.54
7.4.240.0040.00416.56
7.4.230.0000.00716.49
7.4.220.0130.00616.52
7.4.210.0090.00716.61
7.4.200.0030.00416.35
7.4.190.0060.00316.56
7.4.160.0120.00316.48
7.4.150.0120.00417.40
7.4.140.0100.00817.86
7.4.130.0090.00816.52
7.4.120.0130.00516.53
7.4.110.0080.00816.63
7.4.100.0170.00416.66
7.4.90.0120.00616.58
7.4.80.0080.00919.39
7.4.70.0150.00616.52
7.4.60.0060.01216.46
7.4.50.0040.00416.51
7.4.40.0060.00922.77
7.4.30.0150.00516.59
7.4.00.0030.01214.88
7.3.330.0000.00513.21
7.3.320.0000.00513.32
7.3.310.0070.00016.29
7.3.300.0030.00316.16
7.3.290.0100.00316.26
7.3.280.0110.00416.32
7.3.270.0240.00017.40
7.3.260.0130.01016.34
7.3.250.0110.00616.28
7.3.240.0140.00716.40
7.3.230.0040.01316.39
7.3.210.0060.01016.52
7.3.200.0000.01519.39
7.3.190.0150.00616.39
7.3.180.0110.01016.38
7.3.170.0110.00716.50
7.3.160.0080.00816.50
7.3.120.0040.01215.02
7.2.330.0060.01316.63
7.2.320.0100.00716.63
7.2.310.0120.00316.60
7.2.300.0100.01016.69
7.2.290.0100.01416.38
7.2.60.0070.00316.88
7.2.00.0070.00719.59
7.1.200.0000.01115.61
7.1.100.0070.01018.03
7.1.70.0030.00917.13
7.1.60.0100.01419.29
7.1.50.0140.00016.57
7.1.00.0000.04322.45
7.0.200.0100.01014.55
7.0.140.0030.09721.98
7.0.60.0130.07319.94
7.0.50.0100.07317.98
7.0.40.0200.07020.24
7.0.30.0270.07020.11
7.0.20.0170.08020.30
7.0.10.0170.06320.26
7.0.00.0170.03020.18
5.6.280.0070.06321.04
5.6.210.0100.06720.61
5.6.200.0070.04018.22
5.6.190.0070.06320.47
5.6.180.0330.07320.60
5.6.170.0270.07320.54
5.6.160.0000.09320.45
5.6.150.0070.03718.13
5.6.140.0130.07718.21
5.6.130.0070.09018.22
5.6.120.0030.04320.95
5.6.110.0030.09020.98
5.6.100.0070.08021.11
5.6.90.0130.08020.95
5.6.80.0130.07720.51
5.6.70.4470.03720.37
5.5.350.0130.08320.38
5.5.340.0030.04017.98
5.5.330.0030.04320.27
5.5.320.0100.04020.24
5.5.310.0230.05020.42
5.5.300.0030.07317.94
5.5.290.0070.03718.08
5.5.280.0030.06020.76
5.5.270.0170.07720.96
5.5.260.0070.07720.77
5.5.250.0100.03720.59
5.5.240.0230.03720.16
5.4.450.0770.05319.55
5.4.440.0900.06719.49
5.4.430.0030.06019.61
5.4.420.0900.07019.61
5.4.410.0770.06019.48
5.4.400.0170.05018.84
5.4.390.0270.05318.80
5.4.380.0230.05318.45
5.4.370.0200.05018.74
5.4.360.0170.05718.83
5.4.350.0100.03512.02
5.4.340.0090.03612.02
5.4.320.0060.04012.51
5.4.310.0080.04412.50
5.4.300.0060.03612.50
5.4.290.0050.03812.50
5.4.280.0050.03812.39
5.4.270.0060.03712.39
5.4.260.0090.04112.39
5.4.250.0200.04718.95
5.4.240.0070.07019.00
5.4.230.0100.05718.96
5.4.220.0170.04318.77
5.4.210.0070.06018.77
5.4.200.0100.06018.97
5.4.190.0130.04718.96
5.4.180.0200.06318.89
5.4.170.0030.05718.79
5.4.160.0100.07719.04
5.4.150.0130.07018.93
5.4.140.0030.05716.40
5.4.130.0030.06016.58
5.4.120.0130.04316.33
5.4.110.0070.05016.52
5.4.100.0100.06016.61
5.4.90.0100.04716.54
5.4.80.0100.04316.34
5.4.70.0000.05316.60
5.4.60.0170.05016.30
5.4.50.0070.05016.43
5.4.40.0130.04316.55
5.4.30.0030.05016.42
5.4.20.0130.04716.43
5.4.10.0070.05716.46
5.4.00.0270.04315.96
5.3.290.0080.03912.80
5.3.280.0230.03714.67
5.3.270.0070.05314.58
5.3.260.0130.05014.68
5.3.250.0070.05014.62
5.3.240.0130.05714.43
5.3.230.0130.04714.58
5.3.220.0100.06314.65
5.3.210.0170.06714.73
5.3.200.0170.04714.65
5.3.190.0100.04714.41
5.3.180.0070.04714.56
5.3.170.0100.04314.56
5.3.160.0070.04714.53
5.3.150.0030.05314.54
5.3.140.0130.07014.63
5.3.130.0070.05314.52
5.3.120.0000.06014.62
5.3.110.0070.05714.72
5.3.100.0100.06714.01
5.3.90.0170.06014.01
5.3.80.0100.05314.01
5.3.70.0030.07714.11
5.3.60.0130.04713.85
5.3.50.0070.04714.02
5.3.40.0100.04314.02
5.3.30.0100.05014.06
5.3.20.0030.05013.59
5.3.10.0100.04313.74
5.3.00.0100.04713.70
5.2.170.0100.04310.97
5.2.160.0100.03311.30
5.2.150.0030.04311.21
5.2.140.0100.03711.09
5.2.130.0070.05711.31
5.2.120.0030.04011.08
5.2.110.0130.03011.08
5.2.100.0030.04311.09
5.2.90.0100.04011.18
5.2.80.0100.03711.25
5.2.70.0200.03311.04
5.2.60.0100.05311.14
5.2.50.0130.03311.11
5.2.40.0100.05011.07
5.2.30.0100.04011.05
5.2.20.0070.03711.18
5.2.10.0070.03710.93
5.2.00.0030.04010.89
5.1.60.0030.0339.97
5.1.50.0000.0379.95
5.1.40.0130.04010.21
5.1.30.0100.03710.41
5.1.20.0000.05010.35
5.1.10.0200.03010.11
5.1.00.0130.03010.02
5.0.50.0100.0208.51
5.0.40.0030.0278.50
5.0.30.0030.0438.31
5.0.20.0070.0278.19
5.0.10.0170.0278.22
5.0.00.0100.0408.08
4.4.90.0070.0177.43
4.4.80.0100.0237.43
4.4.70.0030.0207.43
4.4.60.0030.0307.43
4.4.50.0100.0137.43
4.4.40.0070.0307.43
4.4.30.0030.0337.43
4.4.20.0030.0307.43
4.4.10.0070.0277.43
4.4.00.0000.0337.43
4.3.110.0070.0277.43
4.3.100.0030.0207.43
4.3.90.0000.0337.43
4.3.80.0000.0337.43
4.3.70.0030.0237.43
4.3.60.0000.0237.43
4.3.50.0070.0177.43
4.3.40.0030.0477.43
4.3.30.0030.0207.43
4.3.20.0030.0237.43
4.3.10.0000.0237.43
4.3.00.0070.0176.75

preferences:
63.95 ms | 401 KiB | 5 Q