3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test1($unset = false) { static $bar = 0; if ($unset) { unset($bar); // $bar is no longer linked to the static var, but // it will be on the next request! $bar = "unlinked"; static $bar; } else { $bar++; } echo $bar; } test1(); test1(); test1(true); 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.0060.01318.68
8.3.50.0160.00121.14
8.3.40.0060.01218.67
8.3.30.0070.00720.34
8.3.20.0030.00520.34
8.3.10.0000.00822.18
8.3.00.0040.00422.44
8.2.180.0110.00418.13
8.2.170.0090.00622.96
8.2.160.0120.00320.43
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0160.00326.16
8.2.120.0040.00419.68
8.2.110.0030.00720.56
8.2.100.0040.00819.34
8.2.90.0040.00418.92
8.2.80.0070.00019.21
8.2.70.0000.00917.50
8.2.60.0100.00017.93
8.2.50.0050.00318.07
8.2.40.0050.00318.03
8.2.30.0050.00218.00
8.2.20.0000.00817.72
8.2.10.0030.00517.68
8.2.00.0050.00317.68
8.1.280.0180.00325.92
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00623.70
8.1.230.0040.00819.01
8.1.220.0000.00717.76
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.52
8.1.180.0030.00620.07
8.1.170.0000.00818.48
8.1.160.0050.00322.05
8.1.150.0000.00718.56
8.1.140.0080.00017.38
8.1.130.0070.00017.83
8.1.120.0070.00017.40
8.1.110.0000.00717.46
8.1.100.0000.00717.40
8.1.90.0020.00517.39
8.1.80.0040.00417.36
8.1.70.0040.00417.40
8.1.60.0000.00717.41
8.1.50.0000.00817.45
8.1.40.0000.00817.41
8.1.30.0050.00317.50
8.1.20.0080.00017.68
8.1.10.0080.00017.43
8.1.00.0030.00617.42
8.0.300.0070.00018.77
8.0.290.0070.00017.05
8.0.280.0070.00018.39
8.0.270.0090.00017.25
8.0.260.0000.00716.87
8.0.250.0070.00016.90
8.0.240.0000.00916.93
8.0.230.0030.00316.97
8.0.220.0000.00716.79
8.0.210.0000.00716.87
8.0.200.0060.00016.96
8.0.190.0000.01016.97
8.0.180.0030.00616.85
8.0.170.0030.00616.79
8.0.160.0030.00316.85
8.0.150.0070.00016.91
8.0.140.0050.00316.89
8.0.130.0000.00513.27
8.0.120.0020.00516.82
8.0.110.0040.00416.90
8.0.100.0040.00416.84
8.0.90.0000.00716.89
8.0.80.0130.00316.86
8.0.70.0000.00816.95
8.0.60.0040.00416.72
8.0.50.0000.00716.78
8.0.30.0100.00917.03
8.0.20.0070.01117.40
8.0.10.0070.00017.00
8.0.00.0090.01116.72
7.4.330.0050.00015.00
7.4.320.0030.00316.43
7.4.300.0060.00016.41
7.4.290.0040.00416.55
7.4.280.0040.00416.39
7.4.270.0030.00316.57
7.4.260.0030.00516.48
7.4.250.0040.00416.57
7.4.240.0060.00216.54
7.4.230.0030.00316.55
7.4.220.0110.00716.54
7.4.210.0040.00916.48
7.4.200.0050.00216.44
7.4.190.0030.00616.55
7.4.160.0090.00616.57
7.4.150.0080.00917.40
7.4.140.0100.01117.86
7.4.130.0090.00816.62
7.4.120.0120.00916.51
7.4.110.0180.00716.46
7.4.100.0070.01016.53
7.4.90.0070.01016.69
7.4.80.0150.00619.39
7.4.70.0140.00316.55
7.4.60.0100.00716.67
7.4.50.0030.00316.57
7.4.40.0020.01122.77
7.4.30.0130.00316.71
7.4.00.0030.01314.91
7.3.330.0020.00313.30
7.3.320.0030.00313.06
7.3.310.0000.00816.25
7.3.300.0070.00016.16
7.3.290.0070.01016.31
7.3.280.0080.00816.27
7.3.270.0160.00317.40
7.3.260.0110.00816.34
7.3.250.0110.00616.46
7.3.240.0090.00816.52
7.3.230.0060.01016.43
7.3.210.0140.00316.28
7.3.200.0130.00319.39
7.3.190.0030.01416.64
7.3.180.0060.00916.45
7.3.170.0060.01016.36
7.3.160.0120.00416.57
7.3.120.0070.00714.89
7.3.10.0040.01116.50
7.3.00.0120.00016.35
7.2.330.0140.00416.59
7.2.320.0030.01316.59
7.2.310.0130.00316.80
7.2.300.0110.00616.73
7.2.290.0220.00316.45
7.2.130.0080.00316.68
7.2.120.0030.01016.67
7.2.110.0170.00316.79
7.2.100.0000.00916.86
7.2.90.0110.00316.46
7.2.80.0060.00316.43
7.2.70.0070.00716.90
7.2.60.0030.00816.99
7.2.50.0110.00316.80
7.2.40.0120.00816.66
7.2.30.0100.00616.93
7.2.20.0080.00416.61
7.2.10.0090.00316.94
7.2.00.0020.01217.99
7.1.250.0080.00015.57
7.1.100.0030.01017.74
7.1.70.0030.00716.97
7.1.60.0070.01819.29
7.1.50.0060.01617.02
7.1.00.0030.03322.54
7.0.200.0140.00414.86
7.0.140.0030.07022.07
7.0.60.0000.04319.93
7.0.50.0170.04317.87
7.0.40.0030.04320.26
7.0.30.0230.06020.17
7.0.20.0270.07720.05
7.0.10.0270.04320.33
7.0.00.0100.08020.09
5.6.280.0000.07721.14
5.6.210.0070.04020.55
5.6.200.0070.03718.18
5.6.190.0100.08020.55
5.6.180.0230.05320.36
5.6.170.0230.06320.47
5.6.160.0030.08020.44
5.6.150.0130.07718.15
5.6.140.0070.04018.25
5.6.130.0130.06718.27
5.6.120.0030.06321.02
5.6.110.0130.08020.99
5.6.100.0070.08321.12
5.6.90.0100.08321.00
5.6.80.0000.05320.39
5.6.70.0200.02320.41
5.5.350.0200.07320.44
5.5.340.0100.05017.94
5.5.330.0070.08020.13
5.5.320.0230.07720.36
5.5.310.0230.05020.41
5.5.300.0070.03718.08
5.5.290.0100.06017.99
5.5.280.0130.06020.87
5.5.270.0130.07720.73
5.5.260.0030.04020.86
5.5.250.0200.07020.54
5.5.240.0100.07720.29
5.4.450.0870.05719.58
5.4.440.0730.06719.48
5.4.430.0630.05319.61
5.4.420.0700.04319.69
5.4.410.0300.06019.48
5.4.400.0270.05018.90
5.4.390.0270.06018.57
5.4.380.0270.05718.75
5.4.370.0300.05318.59
5.4.360.0230.05018.64
5.4.350.0050.03712.02
5.4.340.0070.03612.02
5.4.320.0070.03512.50
5.4.310.0070.03912.50
5.4.300.0070.03712.51
5.4.290.0090.04012.50
5.4.280.0080.03312.40
5.4.270.0090.04112.39
5.4.260.0070.03912.39
5.4.250.0130.05018.75
5.4.240.0130.06318.94
5.4.230.0070.06718.90
5.4.220.0070.05319.09
5.4.210.0070.08018.80
5.4.200.0100.05319.00
5.4.190.0100.04718.65
5.4.180.0200.06718.99
5.4.170.0100.06718.97
5.4.160.0030.05318.98
5.4.150.0100.07719.08
5.4.140.0100.05016.43
5.4.130.0100.07016.36
5.4.120.0170.06716.50
5.4.110.0100.06716.57
5.4.100.0100.05016.49
5.4.90.0030.07016.47
5.4.80.0070.05016.37
5.4.70.0070.06316.39
5.4.60.0170.05716.38
5.4.50.0100.04716.35
5.4.40.0030.06016.41
5.4.30.0100.04716.44
5.4.20.0070.04716.55
5.4.10.0100.05316.29
5.4.00.0030.05016.00
5.3.290.0070.04912.80
5.3.280.0100.05014.55
5.3.270.0170.04714.61
5.3.260.0100.07014.57
5.3.250.0070.07714.79
5.3.240.0070.06014.51
5.3.230.0100.07014.61
5.3.220.0030.05314.64
5.3.210.0030.05714.65
5.3.200.0100.04714.64
5.3.190.0070.05314.64
5.3.180.0170.03714.56
5.3.170.0030.06314.78
5.3.160.0100.05314.62
5.3.150.0130.06314.64
5.3.140.0070.04714.52
5.3.130.0130.06714.53
5.3.120.0130.04714.50
5.3.110.0100.06714.44
5.3.100.0130.04014.04
5.3.90.0170.04013.98
5.3.80.0070.07314.10
5.3.70.0070.06714.04
5.3.60.0130.04713.98
5.3.50.0130.06314.16
5.3.40.0130.04714.05
5.3.30.0030.06713.88
5.3.20.0100.05313.69
5.3.10.0070.05313.63
5.3.00.0000.05713.82
5.2.170.0030.04311.22
5.2.160.0130.05011.10
5.2.150.0130.04011.04
5.2.140.0070.05011.20
5.2.130.0070.04011.17
5.2.120.0070.05010.93
5.2.110.0100.03711.00
5.2.100.0170.04311.16
5.2.90.0070.05711.25
5.2.80.0070.04011.16
5.2.70.0070.04311.16
5.2.60.0100.03710.96
5.2.50.0130.03710.86
5.2.40.0030.04311.02
5.2.30.0070.04311.03
5.2.20.0030.04711.02
5.2.10.0170.03710.76
5.2.00.0000.04710.93
5.1.60.0170.03310.21
5.1.50.0030.03310.09
5.1.40.0070.04310.21
5.1.30.0170.02310.31
5.1.20.0030.03710.51
5.1.10.0030.04010.27
5.1.00.0100.04010.13
5.0.50.0000.0408.52
5.0.40.0170.0208.65
5.0.30.0130.0478.28
5.0.20.0070.0277.98
5.0.10.0100.0338.22
5.0.00.0070.0438.11
4.4.90.0030.0207.40
4.4.80.0030.0207.40
4.4.70.0030.0207.40
4.4.60.0030.0207.40
4.4.50.0030.0237.40
4.4.40.0030.0337.40
4.4.30.0030.0237.40
4.4.20.0000.0277.40
4.4.10.0000.0237.40
4.4.00.0100.0337.40
4.3.110.0070.0277.40
4.3.100.0100.0237.40
4.3.90.0030.0277.40
4.3.80.0000.0337.40
4.3.70.0070.0277.40
4.3.60.0030.0207.40
4.3.50.0000.0237.40
4.3.40.0030.0307.40
4.3.30.0070.0237.40
4.3.20.0030.0207.40
4.3.10.0000.0237.40
4.3.00.0100.0276.75

preferences:
54.98 ms | 401 KiB | 5 Q