3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test1($unset = false) { static $bar = 1; $bar++; echo $bar; unset($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();

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.0120.00521.14
8.3.40.0140.00718.68
8.3.30.0070.01020.43
8.3.20.0000.00720.13
8.3.10.0060.00321.96
8.3.00.0050.00322.43
8.2.180.0060.01316.38
8.2.170.0100.01022.96
8.2.160.0000.01320.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0060.01326.16
8.2.120.0030.00519.66
8.2.110.0030.00622.20
8.2.100.0040.00719.22
8.2.90.0000.00819.22
8.2.80.0080.00019.39
8.2.70.0000.00917.34
8.2.60.0040.00418.04
8.2.50.0000.00818.07
8.2.40.0000.00918.22
8.2.30.0040.00418.07
8.2.20.0050.00217.74
8.2.10.0050.00317.74
8.2.00.0040.00717.56
8.1.280.0100.01025.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.86
8.1.230.0000.01119.21
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0080.00017.50
8.1.180.0040.00419.01
8.1.170.0000.00818.65
8.1.160.0000.00722.06
8.1.150.0040.00418.64
8.1.140.0040.00417.44
8.1.130.0030.00317.83
8.1.120.0070.00017.45
8.1.110.0040.00417.50
8.1.100.0030.00317.43
8.1.90.0070.00017.32
8.1.80.0050.00217.43
8.1.70.0080.00017.37
8.1.60.0040.00417.61
8.1.50.0040.00417.40
8.1.40.0050.00217.41
8.1.30.0020.00517.60
8.1.20.0000.00817.65
8.1.10.0070.00017.50
8.1.00.0030.00617.42
8.0.300.0030.00318.77
8.0.290.0030.00317.18
8.0.280.0100.00018.48
8.0.270.0040.00417.17
8.0.260.0000.00616.88
8.0.250.0030.00316.94
8.0.240.0030.00516.95
8.0.230.0000.00716.99
8.0.220.0000.00716.90
8.0.210.0070.00016.79
8.0.200.0060.00016.92
8.0.190.0040.00717.00
8.0.180.0000.00716.90
8.0.170.0080.00016.96
8.0.160.0000.00716.89
8.0.150.0000.00816.81
8.0.140.0000.00716.86
8.0.130.0000.00613.29
8.0.120.0080.00016.73
8.0.110.0020.00516.94
8.0.100.0000.00716.74
8.0.90.0040.00416.93
8.0.80.0040.01116.89
8.0.70.0040.00416.96
8.0.60.0000.00716.83
8.0.50.0040.00416.81
8.0.30.0100.01417.05
8.0.20.0110.00717.40
8.0.10.0000.00716.88
8.0.00.0110.01016.84
7.4.330.0000.00515.00
7.4.320.0000.00716.55
7.4.300.0030.00316.60
7.4.290.0030.00316.49
7.4.280.0030.00316.48
7.4.270.0060.00016.59
7.4.260.0030.00316.54
7.4.250.0050.00316.47
7.4.240.0020.00516.54
7.4.230.0030.00316.54
7.4.220.0090.01316.49
7.4.210.0110.00416.49
7.4.200.0040.00416.61
7.4.190.0030.00516.66
7.4.160.0090.01216.38
7.4.150.0030.01817.40
7.4.140.0100.01017.86
7.4.130.0110.00916.42
7.4.120.0050.01316.44
7.4.110.0100.00716.36
7.4.100.0130.00316.47
7.4.90.0110.00616.48
7.4.80.0140.01019.39
7.4.70.0080.00816.66
7.4.60.0030.01316.50
7.4.50.0000.00416.21
7.4.40.0000.01422.77
7.4.30.0030.01416.47
7.4.10.0140.00315.11
7.4.00.0050.01014.84
7.3.330.0000.00513.29
7.3.320.0020.00213.09
7.3.310.0000.00716.16
7.3.300.0030.00316.13
7.3.290.0100.00316.29
7.3.280.0100.00616.26
7.3.270.0090.00917.40
7.3.260.0130.00916.43
7.3.250.0130.00616.55
7.3.240.0080.00816.29
7.3.230.0150.00316.39
7.3.210.0060.00916.69
7.3.200.0150.00319.39
7.3.190.0040.01416.28
7.3.180.0140.00316.38
7.3.170.0080.01116.44
7.3.160.0150.00616.36
7.3.130.0070.01115.13
7.3.120.0090.00614.73
7.3.110.0070.01014.45
7.3.100.0070.01014.88
7.3.90.0120.00314.55
7.3.80.0030.01214.80
7.3.70.0030.01014.72
7.3.60.0070.00414.73
7.3.50.0000.01514.88
7.3.40.0060.01014.84
7.3.30.0080.00414.56
7.3.20.0030.01216.73
7.3.10.0070.00716.59
7.3.00.0030.01016.64
7.2.330.0110.00816.61
7.2.320.0070.01016.68
7.2.310.0060.01016.65
7.2.300.0060.00916.41
7.2.290.0060.01316.66
7.2.260.0090.00915.02
7.2.250.0070.01415.22
7.2.240.0030.01315.29
7.2.230.0120.00615.12
7.2.220.0070.00714.62
7.2.210.0030.00914.83
7.2.200.0120.00314.94
7.2.190.0030.00714.98
7.2.180.0070.00714.87
7.2.170.0050.00515.04
7.2.160.0070.00414.96
7.2.150.0090.01216.92
7.2.140.0110.00416.97
7.2.130.0090.00616.66
7.2.120.0040.01116.71
7.2.110.0030.00916.65
7.2.100.0030.00716.68
7.2.90.0060.00916.67
7.2.80.0030.01417.06
7.2.70.0030.01316.87
7.2.60.0130.00616.83
7.2.50.0030.00716.96
7.2.40.0040.01116.73
7.2.30.0060.01116.77
7.2.20.0040.01116.78
7.2.10.0090.00616.88
7.2.00.0070.00718.03
7.1.330.0030.00915.50
7.1.320.0070.00715.63
7.1.310.0060.00615.80
7.1.300.0040.01415.93
7.1.290.0040.00815.83
7.1.280.0030.01015.73
7.1.270.0030.01015.76
7.1.260.0100.01015.87
7.1.250.0080.00515.49
7.1.240.0100.00315.70
7.1.230.0070.00715.65
7.1.220.0080.00015.69
7.1.210.0030.01015.76
7.1.200.0000.01515.69
7.1.190.0090.00615.86
7.1.180.0060.00915.74
7.1.170.0100.00315.73
7.1.160.0070.00415.69
7.1.150.0040.01515.46
7.1.140.0060.00315.73
7.1.130.0040.00715.59
7.1.120.0110.00315.82
7.1.110.0040.01115.59
7.1.100.0030.00616.83
7.1.90.0030.00615.89
7.1.80.0060.00315.61
7.1.70.0030.00716.30
7.1.60.0070.01417.54
7.1.50.0050.01616.41
7.1.40.0100.00715.40
7.1.30.0030.00715.67
7.1.20.0060.00915.48
7.1.10.0030.00715.48
7.1.00.0050.02118.84
7.0.330.0000.00815.39
7.0.320.0030.00715.39
7.0.310.0050.00515.35
7.0.300.0000.01115.42
7.0.290.0070.00715.20
7.0.280.0110.00715.39
7.0.270.0000.00915.37
7.0.260.0070.00715.43
7.0.250.0100.00315.17
7.0.240.0000.01115.32
7.0.230.0090.00315.30
7.0.220.0070.00415.51
7.0.210.0030.01315.51
7.0.200.1130.00915.15
7.0.190.0000.01615.41
7.0.180.0060.00315.26
7.0.170.0050.00815.52
7.0.160.0060.01215.41
7.0.150.0030.00915.48
7.0.140.0030.03918.57
7.0.130.0080.00315.14
7.0.120.0030.00915.36
7.0.110.0000.00915.20
7.0.100.0090.00015.40
7.0.90.0110.00315.32
7.0.80.0030.01015.23
7.0.70.0060.00315.53
7.0.60.0030.03717.58
7.0.50.0080.02516.59
7.0.40.0120.03916.67
7.0.30.0150.04016.72
7.0.20.0200.02516.81
7.0.10.0140.02516.77
7.0.00.0110.04016.80
5.6.400.0060.00314.14
5.6.390.0000.01414.25
5.6.380.0000.01414.44
5.6.370.0040.01214.36
5.6.360.0000.00814.48
5.6.350.0060.00614.22
5.6.340.0030.01013.79
5.6.330.0060.00314.43
5.6.320.0050.00514.50
5.6.310.0080.00614.32
5.6.300.0060.00314.63
5.6.290.0040.00714.38
5.6.280.0060.03817.66
5.6.270.0120.00314.47
5.6.260.0070.00714.11
5.6.250.0070.00714.01
5.6.240.0120.00014.48
5.6.230.0070.00714.28
5.6.220.0070.00314.29
5.6.210.0050.04517.33
5.6.200.0070.03816.33
5.6.190.0080.03317.45
5.6.180.0180.04317.47
5.6.170.0170.02917.41
5.6.160.0090.04117.33
5.6.150.0060.02616.20
5.6.140.0050.02516.22
5.6.130.0030.04716.19
5.6.120.0120.04217.63
5.6.110.0110.02917.61
5.6.100.0100.04017.66
5.6.90.0050.04617.72
5.6.80.0100.01817.55
5.6.70.0150.03717.19
5.6.60.0070.00314.39
5.6.50.0040.01114.04
5.6.40.0090.00014.14
5.6.30.0030.01214.20
5.6.20.0000.00814.02
5.6.10.0030.01314.38
5.6.00.0030.00614.12
5.5.380.0080.00413.91
5.5.370.0000.01014.35
5.5.360.0070.00714.12
5.5.350.0120.03517.35
5.5.340.0070.04216.21
5.5.330.0050.03817.17
5.5.320.0130.04417.29
5.5.310.0170.04617.14
5.5.300.0070.04516.21
5.5.290.0080.02016.17
5.5.280.0050.03317.63
5.5.270.0030.05217.50
5.5.260.0020.05217.46
5.5.250.0020.02717.44
5.5.240.0070.04317.10
5.5.230.0060.00614.01
5.5.220.0040.01114.08
5.5.210.0000.01614.20
5.5.200.0030.01413.89
5.5.190.0060.00914.19
5.5.180.0060.00914.24
5.5.170.0100.00714.00
5.5.160.0060.00913.96
5.5.150.0030.01014.35
5.5.140.0030.00614.28
5.5.130.0070.00714.11
5.5.120.0030.01314.17
5.5.110.0080.00814.15
5.5.100.0120.00013.71
5.5.90.0030.01014.29
5.5.80.0090.00614.31
5.5.70.0030.01314.21
5.5.60.0070.01014.05
5.5.50.0070.00414.21
5.5.40.0030.01314.28
5.5.30.0080.00414.19
5.5.20.0000.01314.10
5.5.10.0060.00614.32
5.5.00.0130.00314.31
5.4.450.0380.03315.77
5.4.440.0430.02515.83
5.4.430.0060.04315.77
5.4.420.0500.03615.79
5.4.410.0070.03215.72
5.4.400.0250.03715.38
5.4.390.0150.03015.34
5.4.380.0130.03115.38
5.4.370.0090.03115.24
5.4.360.0110.02815.37
5.4.350.0060.02111.99
5.4.340.0100.02311.99
5.4.330.0000.00711.96
5.4.320.0040.02412.23
5.4.310.0060.02312.23
5.4.300.0060.02112.23
5.4.290.0060.02212.23
5.4.280.0050.02012.18
5.4.270.0060.02212.18
5.4.260.0030.02212.18
5.4.250.0080.02715.42
5.4.240.0060.02615.40
5.4.230.0030.03115.31
5.4.220.0050.03215.32
5.4.210.0050.04215.40
5.4.200.0030.03115.35
5.4.190.0050.03015.41
5.4.180.0110.02515.43
5.4.170.0060.03015.31
5.4.160.0100.02315.39
5.4.150.0100.02315.42
5.4.140.0060.02914.17
5.4.130.0100.02314.16
5.4.120.0080.02514.27
5.4.110.0030.04014.18
5.4.100.0080.02314.10
5.4.90.0060.02614.18
5.4.80.0120.02014.09
5.4.70.0050.02814.12
5.4.60.0090.02414.24
5.4.50.0050.02714.17
5.4.40.0050.02614.19
5.4.30.0040.03514.16
5.4.20.0070.02514.13
5.4.10.0040.02914.19
5.4.00.0030.02913.89
5.3.290.0060.03012.38
5.3.280.0100.03813.26
5.3.270.0050.03213.29
5.3.260.0090.03713.39
5.3.250.0050.02513.39
5.3.240.0050.02813.20
5.3.230.0030.03013.30
5.3.220.0040.02913.30
5.3.210.0050.02813.29
5.3.200.0070.02713.33
5.3.190.0000.03113.30
5.3.180.0050.02713.21
5.3.170.0000.03213.30
5.3.160.0030.03113.22
5.3.150.0060.02613.29
5.3.140.0090.03513.27
5.3.130.0120.03213.24
5.3.120.0050.02813.29
5.3.110.0050.02713.34
5.3.100.0030.03013.04
5.3.90.0020.03013.03
5.3.80.0070.02413.02
5.3.70.0120.02213.03
5.3.60.0070.02513.06
5.3.50.0080.02312.95
5.3.40.0100.03012.96
5.3.30.0050.02912.88
5.3.20.0070.02412.93
5.3.10.0070.02712.83
5.3.00.0020.03112.79
5.2.170.0000.04711.23
5.2.160.0030.04311.30
5.2.150.0100.03711.32
5.2.140.0000.04311.36
5.2.130.0000.04311.00
5.2.120.0100.04311.18
5.2.110.0030.04011.17
5.2.100.0130.03011.25
5.2.90.0100.04311.16
5.2.80.0000.04311.21
5.2.70.0100.03711.26
5.2.60.0000.04311.11
5.2.50.0030.04311.11
5.2.40.0070.04711.08
5.2.30.0100.03311.14
5.2.20.0100.03010.91
5.2.10.0030.03711.09
5.2.00.0030.06010.71
5.1.60.0000.0379.92
5.1.50.0070.04310.04
5.1.40.0030.0339.81
5.1.30.0070.03310.49
5.1.20.0070.03310.41
5.1.10.0030.03310.06
5.1.00.0170.02310.07
5.0.50.0030.0278.52
5.0.40.0070.0238.41
5.0.30.0000.0438.21
5.0.20.0000.0308.34
5.0.10.0000.0338.26
5.0.00.0000.0538.18
4.4.90.0070.0177.41
4.4.80.0000.0237.41
4.4.70.0000.0277.41
4.4.60.0030.0207.41
4.4.50.0170.0107.41
4.4.40.0030.0337.41
4.4.30.0000.0237.41
4.4.20.0070.0207.41
4.4.10.0030.0207.41
4.4.00.0030.0307.41
4.3.110.0070.0277.41
4.3.100.0000.0307.41
4.3.90.0030.0207.41
4.3.80.0000.0377.41
4.3.70.0000.0237.41
4.3.60.0030.0277.41
4.3.50.0000.0277.41
4.3.40.0030.0437.41
4.3.30.0030.0237.41
4.3.20.0000.0337.41
4.3.10.0130.0177.41
4.3.00.0130.0276.68

preferences:
104.17 ms | 400 KiB | 5 Q