3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test1($unset = false) { static $bar = 1; $bar++; echo $bar; unset($bar); echo $bar; $bar = "|"; echo $bar; // this initialization value is hoisted to the top of the function! static $bar = 5; $bar++; echo $bar; echo " "; } test1(); test1(); test1(); test1(); static $bar = 1337;

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.0030.01218.43
8.3.60.0110.01118.37
8.3.50.0240.00321.08
8.3.40.0150.00418.64
8.3.30.0070.00720.13
8.3.20.0040.00420.32
8.3.10.0030.00621.77
8.3.00.0030.00522.44
8.2.190.0100.01018.41
8.2.180.0090.00616.50
8.2.170.0140.00722.96
8.2.160.0030.01020.44
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0000.00820.68
8.2.110.0090.00022.00
8.2.100.0070.00419.16
8.2.90.0080.00019.09
8.2.80.0000.00719.39
8.2.70.0030.00617.75
8.2.60.0000.00818.05
8.2.50.0030.00518.07
8.2.40.0060.00318.22
8.2.30.0030.00618.01
8.2.20.0080.00017.77
8.2.10.0050.00317.80
8.2.00.0030.00717.75
8.1.280.0090.00625.92
8.1.270.0060.00323.99
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0060.00318.62
8.1.230.0090.00319.21
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.00917.23
8.1.190.0000.00817.41
8.1.180.0040.00419.13
8.1.170.0050.00318.45
8.1.160.0030.00322.00
8.1.150.0040.00418.63
8.1.140.0070.00017.46
8.1.130.0070.00017.83
8.1.120.0000.00717.36
8.1.110.0040.00417.42
8.1.100.0080.00017.36
8.1.90.0040.00417.27
8.1.80.0070.00017.39
8.1.70.0000.00817.29
8.1.60.0040.00417.52
8.1.50.0050.00317.56
8.1.40.0080.00017.47
8.1.30.0000.00717.57
8.1.20.0040.00417.66
8.1.10.0080.00017.57
8.1.00.0050.00217.38
8.0.300.0030.00518.77
8.0.290.0040.00417.04
8.0.280.0030.00718.43
8.0.270.0030.00317.25
8.0.260.0000.00816.81
8.0.250.0030.00316.93
8.0.240.0000.00817.03
8.0.230.0030.00316.97
8.0.220.0000.00716.86
8.0.210.0030.00316.90
8.0.200.0040.00416.89
8.0.190.0030.00917.03
8.0.180.0000.00716.99
8.0.170.0050.00316.99
8.0.160.0030.00416.97
8.0.150.0030.00316.79
8.0.140.0070.00016.83
8.0.130.0050.00013.35
8.0.120.0030.00516.90
8.0.110.0050.00216.96
8.0.100.0040.00416.91
8.0.90.0030.00316.80
8.0.80.0080.00817.00
8.0.70.0040.00416.79
8.0.60.0070.00016.87
8.0.50.0000.00717.02
8.0.30.0100.01317.19
8.0.20.0110.01017.40
8.0.10.0040.00417.05
8.0.00.0120.00716.76
7.4.330.0020.00215.00
7.4.320.0000.00616.54
7.4.300.0030.00316.51
7.4.290.0070.00016.57
7.4.280.0000.00716.45
7.4.270.0000.00716.50
7.4.260.0030.00316.54
7.4.250.0070.00016.62
7.4.240.0020.00516.54
7.4.230.0030.00316.50
7.4.220.0060.01316.60
7.4.210.0070.00716.54
7.4.200.0070.00016.41
7.4.190.0070.00016.46
7.4.160.0080.01216.60
7.4.150.0120.00617.40
7.4.140.0140.02217.86
7.4.130.0100.00816.52
7.4.120.0120.00416.61
7.4.110.0090.00916.61
7.4.100.0100.01016.45
7.4.90.0090.00916.54
7.4.80.0090.01419.39
7.4.70.0060.01016.41
7.4.60.0100.00716.50
7.4.50.0040.00416.70
7.4.40.0140.00022.77
7.4.30.0090.00916.39
7.4.00.0100.00715.05
7.3.330.0050.00013.38
7.3.320.0050.00013.22
7.3.310.0000.00716.38
7.3.300.0040.00416.36
7.3.290.0070.00716.33
7.3.280.0080.00916.38
7.3.270.0110.00717.40
7.3.260.0130.01316.46
7.3.250.0090.01216.43
7.3.240.0100.00616.61
7.3.230.0130.00416.43
7.3.210.0100.00716.30
7.3.200.0100.00719.39
7.3.190.0040.01616.41
7.3.180.0100.00716.52
7.3.170.0120.00316.52
7.3.160.0110.00616.44
7.3.120.0030.01315.01
7.3.10.0000.01116.42
7.3.00.0060.00616.85
7.2.330.0090.00916.32
7.2.320.0030.01516.50
7.2.310.0110.00716.60
7.2.300.0060.01616.76
7.2.290.0100.00716.69
7.2.130.0070.00716.60
7.2.120.0070.00316.53
7.2.110.0140.00016.93
7.2.100.0070.00316.85
7.2.90.0100.00616.89
7.2.80.0000.01216.57
7.2.70.0100.00016.72
7.2.60.0060.00916.87
7.2.50.0080.00816.97
7.2.40.0070.00416.77
7.2.30.0070.01016.73
7.2.20.0070.00716.59
7.2.10.0070.01016.66
7.2.00.0030.00816.88
7.1.250.0110.00415.81
7.1.70.0080.00816.95
7.1.60.0070.01719.29
7.1.50.0140.01016.57
7.1.00.0000.04322.45
7.0.200.0580.01014.66
7.0.140.0100.06321.95
7.0.60.0070.06720.01
7.0.50.0100.08017.88
7.0.40.0230.07020.09
7.0.30.0330.07720.34
7.0.20.0230.07320.23
7.0.10.0230.07320.04
7.0.00.0030.08020.20
5.6.210.0070.08720.76
5.6.200.0100.03718.19
5.6.190.0130.06720.66
5.6.180.0170.05720.56
5.6.170.0100.04720.63
5.6.160.0000.04320.46
5.6.150.0070.05018.15
5.6.140.0130.07318.19
5.6.130.0130.06318.11
5.6.120.0070.04721.02
5.6.110.0030.05321.00
5.6.100.0000.08020.99
5.6.90.0100.08320.98
5.6.80.0030.04320.43
5.5.350.0030.07320.41
5.5.340.0100.07018.04
5.5.330.0030.07720.41
5.5.320.0000.05320.23
5.5.310.0230.08020.51
5.5.300.0130.07318.00
5.5.290.0070.05717.98
5.5.280.0030.04720.87
5.5.270.0100.03320.89
5.5.260.0100.08320.61
5.5.250.0130.08320.78
5.5.240.0070.08320.12
5.4.450.0700.06319.44
5.4.440.0730.08319.55
5.4.430.0800.05019.19
5.4.420.0470.05319.47
5.4.410.0830.05019.21
5.4.400.1000.05019.31
5.4.390.1100.07319.02
5.4.380.0270.05018.72
5.4.370.0100.05018.70
5.4.360.0100.03718.75
5.4.350.0120.03412.02
5.4.340.0030.03912.02
5.4.320.0120.03012.51
5.4.310.0090.04312.50
5.4.300.0070.03712.50
5.4.290.0130.04212.50
5.4.280.0040.04012.40
5.4.270.0070.04412.39
5.4.260.0040.04612.40
5.4.250.0100.05718.78
5.4.240.0070.05318.72
5.4.230.0070.07718.89
5.4.220.0030.06318.85
5.4.210.0070.05318.91
5.4.200.0200.04318.83
5.4.190.0070.05018.84
5.4.180.0200.06018.84
5.4.170.0170.04318.84
5.4.160.0000.05718.53
5.4.150.0100.05018.53
5.4.140.0070.05016.48
5.4.130.0100.04716.39
5.4.120.0130.04316.55
5.4.110.0000.05716.22
5.4.100.0030.05016.46
5.4.90.0100.07316.39
5.4.80.0100.04316.29
5.4.70.0100.06316.30
5.4.60.0170.04016.20
5.4.50.0130.04316.33
5.4.40.0100.04316.33
5.4.30.0100.04316.32
5.4.20.0070.04716.36
5.4.10.0130.04316.23
5.4.00.0170.04015.83
5.3.290.0100.03612.80
5.3.280.0070.05314.42
5.3.270.0030.05714.68
5.3.260.0130.05014.60
5.3.250.0100.04714.82
5.3.240.0070.05014.43
5.3.230.0130.04314.61
5.3.220.0000.06014.72
5.3.210.0170.04314.58
5.3.200.0030.05314.39
5.3.190.0100.04714.78
5.3.180.0030.05314.63
5.3.170.0130.04314.78
5.3.160.0070.05314.72
5.3.150.0030.05714.70
5.3.140.0100.05314.64
5.3.130.0100.05014.61
5.3.120.0070.05314.76
5.3.110.0070.05014.76
5.3.100.0070.04714.16
5.3.90.0100.05313.84
5.3.80.0100.04314.10
5.3.70.0070.05013.98
5.3.60.0030.06014.07
5.3.50.0070.04713.93
5.3.40.0000.06013.95
5.3.30.0000.05314.06
5.3.20.0070.04713.78
5.3.10.0030.05013.73
5.3.00.0070.04713.63
5.2.170.0070.04011.05
5.2.160.0000.04311.36
5.2.150.0030.04011.14
5.2.140.0070.03711.22
5.2.130.0030.04011.09
5.2.120.0100.03311.09
5.2.110.0130.03311.16
5.2.100.0030.04011.27
5.2.90.0070.03711.16
5.2.80.0030.04011.16
5.2.70.0070.03711.18
5.2.60.0030.04011.05
5.2.50.0100.03311.02
5.2.40.0070.04710.97
5.2.30.0070.03710.80
5.2.20.0000.05011.14
5.2.10.0070.03310.81
5.2.00.0170.03710.80
5.1.60.0200.01710.05
5.1.50.0000.0379.97
5.1.40.0070.0339.93
5.1.30.0000.03710.28
5.1.20.0030.03710.25
5.1.10.0030.03710.13
5.1.00.0100.03310.22
5.0.50.0000.0308.78
5.0.40.0030.0278.32
5.0.30.0030.0408.32
5.0.20.0030.0378.28
5.0.10.0030.0278.16
5.0.00.0030.0508.13
4.4.90.0000.0237.43
4.4.80.0000.0237.43
4.4.70.0030.0307.43
4.4.60.0000.0237.43
4.4.50.0030.0207.43
4.4.40.0030.0337.43
4.4.30.0000.0307.43
4.4.20.0000.0237.43
4.4.10.0030.0207.43
4.4.00.0030.0337.43
4.3.110.0000.0237.43
4.3.100.0000.0237.43
4.3.90.0030.0207.43
4.3.80.0000.0337.43
4.3.70.0070.0177.43
4.3.60.0030.0277.43
4.3.50.0100.0207.43
4.3.40.0000.0407.43
4.3.30.0000.0237.43
4.3.20.0000.0237.43
4.3.10.0030.0207.43
4.3.00.0100.0207.29

preferences:
50.96 ms | 401 KiB | 5 Q