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 = 10; } 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.0100.01018.68
8.3.50.0040.01118.30
8.3.40.0100.00718.56
8.3.30.0100.00320.21
8.3.20.0040.00420.35
8.3.10.0040.00422.09
8.3.00.0000.00822.32
8.2.180.0110.00416.35
8.2.170.0170.00322.96
8.2.160.0150.00020.43
8.2.150.0080.00024.18
8.2.140.0070.00324.66
8.2.130.0150.00326.16
8.2.120.0080.00019.54
8.2.110.0040.00820.53
8.2.100.0070.00419.31
8.2.90.0050.00319.22
8.2.80.0040.00419.19
8.2.70.0040.00417.38
8.2.60.0080.00017.93
8.2.50.0000.00918.07
8.2.40.0040.00417.86
8.2.30.0050.00318.13
8.2.20.0040.00417.72
8.2.10.0000.00717.62
8.2.00.0040.00417.73
8.1.270.0000.00924.66
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00423.92
8.1.230.0100.00019.10
8.1.220.0000.00717.79
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0050.00317.41
8.1.180.0000.00720.19
8.1.170.0040.00418.47
8.1.160.0000.00722.13
8.1.150.0000.00818.61
8.1.140.0000.00717.45
8.1.130.0030.00317.74
8.1.120.0080.00017.55
8.1.110.0040.00417.31
8.1.100.0000.00717.45
8.1.90.0050.00317.32
8.1.80.0000.00717.29
8.1.70.0030.00317.38
8.1.60.0040.00417.63
8.1.50.0000.00817.41
8.1.40.0030.00517.41
8.1.30.0070.00017.62
8.1.20.0080.00017.67
8.1.10.0040.00417.38
8.1.00.0090.00017.42
8.0.300.0040.00418.77
8.0.290.0000.00717.14
8.0.280.0070.00018.45
8.0.270.0030.00617.26
8.0.260.0040.00416.84
8.0.250.0000.00716.91
8.0.240.0080.00016.87
8.0.230.0040.00416.94
8.0.220.0000.00616.80
8.0.210.0000.00816.90
8.0.200.0020.00517.02
8.0.190.0040.00716.97
8.0.180.0040.00416.89
8.0.170.0040.00416.77
8.0.160.0070.00016.88
8.0.150.0030.00316.93
8.0.140.0000.00816.84
8.0.130.0000.00513.39
8.0.120.0040.00416.75
8.0.110.0000.00716.72
8.0.100.0070.00016.74
8.0.90.0000.00716.89
8.0.80.0040.01116.91
8.0.70.0040.00416.78
8.0.60.0050.00217.00
8.0.50.0030.00516.96
8.0.30.0110.00617.06
8.0.20.0140.00517.40
8.0.10.0000.00717.05
8.0.00.0070.01016.79
7.4.330.0020.00215.00
7.4.320.0030.00316.49
7.4.300.0060.00016.61
7.4.290.0030.00316.42
7.4.280.0030.00316.45
7.4.270.0070.00016.60
7.4.260.0030.00316.56
7.4.250.0080.00016.49
7.4.240.0050.00216.58
7.4.230.0080.00016.49
7.4.220.0090.01316.59
7.4.210.0050.01016.51
7.4.200.0070.00016.53
7.4.190.0090.00016.69
7.4.160.0060.00916.63
7.4.150.0100.01017.40
7.4.140.0140.00317.86
7.4.130.0080.00816.46
7.4.120.0070.00916.39
7.4.110.0040.01416.64
7.4.100.0130.00716.46
7.4.90.0060.01016.31
7.4.80.0100.00719.39
7.4.70.0100.00616.66
7.4.60.0120.00316.50
7.4.50.0040.00016.32
7.4.40.0080.00322.77
7.4.30.0090.00916.52
7.4.10.0040.00814.96
7.4.00.0090.00914.99
7.3.330.0030.00313.27
7.3.320.0000.00513.30
7.3.310.0030.00616.30
7.3.300.0000.00716.30
7.3.290.0040.01116.35
7.3.280.0110.00716.30
7.3.270.0140.00317.40
7.3.260.0060.01216.56
7.3.250.0110.00616.62
7.3.240.0120.00416.49
7.3.230.0140.00616.62
7.3.210.0060.01016.32
7.3.200.0000.01619.39
7.3.190.0130.00616.59
7.3.180.0000.01516.26
7.3.170.0100.00516.64
7.3.160.0070.01016.59
7.3.130.0090.00614.78
7.3.120.0070.00914.77
7.3.110.0080.01114.96
7.3.100.0040.01114.98
7.3.90.0080.00914.74
7.3.80.0060.00614.78
7.3.70.0080.00614.68
7.3.60.0040.01014.90
7.3.50.0040.00914.84
7.3.40.0090.00614.66
7.3.30.0080.00314.94
7.3.20.0050.00816.77
7.3.10.0050.01216.76
7.3.00.0050.00916.57
7.2.330.0120.00616.65
7.2.320.0110.01116.71
7.2.310.0120.00916.59
7.2.300.0080.00816.30
7.2.290.0150.00916.73
7.2.260.0070.01414.84
7.2.250.0090.00914.86
7.2.240.0040.01314.79
7.2.230.0090.00915.14
7.2.220.0050.01015.16
7.2.210.0070.00714.99
7.2.200.0100.00715.04
7.2.190.0070.00714.91
7.2.180.0110.00315.05
7.2.170.0000.01515.01
7.2.160.0090.00614.88
7.2.150.0080.00816.89
7.2.140.0060.01016.89
7.2.130.0090.00316.92
7.2.120.0060.00916.93
7.2.110.0000.01816.86
7.2.100.0030.01016.86
7.2.90.0070.01016.97
7.2.80.0070.01016.70
7.2.70.0040.01116.62
7.2.60.0040.01116.89
7.2.50.0090.00616.71
7.2.40.0100.00016.96
7.2.30.0000.01316.94
7.2.20.0070.00716.60
7.2.10.0130.00316.69
7.2.00.0050.01017.96
7.1.330.0030.01015.72
7.1.320.0090.00615.85
7.1.310.0020.01215.69
7.1.300.0090.00515.69
7.1.290.0070.00515.58
7.1.280.0090.00515.59
7.1.270.0050.00415.75
7.1.260.0030.01015.76
7.1.250.0100.00315.99
7.1.240.0080.00415.98
7.1.230.0060.00315.47
7.1.220.0130.00315.84
7.1.210.0040.00715.67
7.1.200.0040.00915.66
7.1.190.0040.01115.60
7.1.180.0030.00815.82
7.1.170.0070.00715.91
7.1.160.0030.00715.73
7.1.150.0070.00715.96
7.1.140.0060.00315.68
7.1.130.0090.00615.71
7.1.120.0000.01116.00
7.1.110.0130.00015.88
7.1.100.0050.01116.85
7.1.90.0070.00715.83
7.1.80.0030.00615.70
7.1.70.0060.00516.48
7.1.60.0050.00716.53
7.1.50.0090.00716.10
7.1.40.0030.01115.84
7.1.30.0060.00615.70
7.1.20.0000.01515.80
7.1.10.0060.00915.87
7.1.00.0050.03619.09
7.0.330.0000.00815.47
7.0.320.0000.00815.16
7.0.310.0060.01215.16
7.0.300.0000.01115.48
7.0.290.0000.01215.48
7.0.280.0120.00015.37
7.0.270.0070.00715.53
7.0.260.0070.00715.48
7.0.250.0080.00415.42
7.0.240.0060.00615.50
7.0.230.0000.01315.41
7.0.220.0070.00715.47
7.0.210.0070.00315.58
7.0.200.0050.01015.97
7.0.190.0040.01115.45
7.0.180.0060.00615.36
7.0.170.0090.00615.37
7.0.160.0080.00815.36
7.0.150.0100.00315.43
7.0.140.0060.03818.78
7.0.130.0030.01215.54
7.0.120.0070.00715.45
7.0.110.0070.00315.54
7.0.100.0000.02617.77
7.0.90.0040.02517.65
7.0.80.0050.02217.61
7.0.70.0030.02017.78
7.0.60.0050.01917.69
7.0.50.0080.02217.69
7.0.40.0100.03916.79
7.0.30.0070.04516.73
7.0.20.0110.03816.75
7.0.10.0030.03116.86
7.0.00.0090.04516.81
5.6.400.0090.00614.54
5.6.390.0100.00014.39
5.6.380.0000.00914.35
5.6.370.0030.01314.60
5.6.360.0100.00714.34
5.6.350.0110.00014.20
5.6.340.0100.00314.03
5.6.330.0040.01114.23
5.6.320.0030.00614.60
5.6.310.0000.01714.37
5.6.300.0030.01014.06
5.6.290.0070.00314.48
5.6.280.0070.04017.64
5.6.270.0060.00614.19
5.6.260.0040.00414.60
5.6.250.0050.02317.50
5.6.240.0020.02417.48
5.6.230.0030.02017.33
5.6.220.0010.02217.44
5.6.210.0040.02217.49
5.6.200.0120.02817.60
5.6.190.0090.03317.75
5.6.180.0080.04017.55
5.6.170.0070.04317.76
5.6.160.0110.03617.62
5.6.150.0110.01817.76
5.6.140.0100.03517.74
5.6.130.0060.04117.62
5.6.120.0070.04717.59
5.6.110.0060.02417.79
5.6.100.0070.03717.77
5.6.90.0110.02117.62
5.6.80.0040.02417.43
5.6.70.0090.03017.38
5.6.60.0080.03217.23
5.6.50.0050.04517.33
5.6.40.0070.03717.35
5.6.30.0100.03817.23
5.6.20.0080.04017.24
5.6.10.0060.02717.18
5.6.00.0110.03017.34
5.5.380.0030.02417.48
5.5.370.0030.01917.25
5.5.360.0070.02317.39
5.5.350.0030.01917.17
5.5.340.0090.03717.57
5.5.330.0030.02717.65
5.5.320.0050.04017.37
5.5.310.0080.03617.53
5.5.300.0020.03317.63
5.5.290.0050.04617.63
5.5.280.0070.04217.42
5.5.270.0080.04217.52
5.5.260.0030.03917.53
5.5.250.0080.03517.29
5.5.240.0060.04317.20
5.5.230.0070.04517.21
5.5.220.0070.03517.32
5.5.210.0020.02517.18
5.5.200.0100.03717.14
5.5.190.0060.04517.22
5.5.180.0030.04117.11
5.5.170.0000.01114.05
5.5.160.0080.03717.28
5.5.150.0140.02517.03
5.5.140.0070.04417.24
5.5.130.0070.03817.17
5.5.120.0100.03717.21
5.5.110.0000.04917.21
5.5.100.0030.04817.10
5.5.90.0010.02617.14
5.5.80.0040.02317.21
5.5.70.0070.02317.10
5.5.60.0070.04517.06
5.5.50.0050.04516.89
5.5.40.0020.04317.09
5.5.30.0070.03817.02
5.5.20.0030.03317.08
5.5.10.0070.04317.26
5.5.00.0050.04317.18
5.4.450.0070.04315.17
5.4.440.0110.03815.13
5.4.430.0070.02715.29
5.4.420.0120.03515.11
5.4.410.0070.02315.01
5.4.400.0070.03514.98
5.4.390.0050.02714.95
5.4.380.0080.03714.85
5.4.370.0070.03715.00
5.4.360.0070.02215.07
5.4.350.0030.02915.02
5.4.340.0050.02514.98
5.4.330.0000.01110.86
5.4.320.0050.02515.08
5.4.310.0020.03715.08
5.4.300.0020.04714.85
5.4.290.0080.02115.07
5.4.280.0020.04715.11
5.4.270.0020.02114.96
5.4.260.0050.03715.10
5.4.250.0020.02814.92
5.4.240.0020.03814.96
5.4.230.0030.03814.87
5.4.220.0050.02115.18
5.4.210.0100.03215.02
5.4.200.0080.03415.03
5.4.190.0130.03514.88
5.4.180.0060.03614.92
5.4.170.0120.03915.08
5.4.160.0030.02715.00
5.4.150.0030.03414.89
5.4.140.0110.03613.63
5.4.130.0060.03513.80
5.4.120.0050.04013.54
5.4.110.0030.02713.70
5.4.100.0050.02013.74
5.4.90.0030.04213.74
5.4.80.0050.03713.58
5.4.70.0080.02813.82
5.4.60.0070.03713.67
5.4.50.0040.02113.64
5.4.40.0050.04113.66
5.4.30.0020.04213.69
5.4.20.0010.02513.72
5.4.10.0020.04313.63
5.4.00.0070.02213.45
5.3.290.0060.03912.54
5.3.280.0080.03012.63
5.3.270.0050.02212.58
5.3.260.0000.02712.65
5.3.250.0060.04112.45
5.3.240.0060.04212.56
5.3.230.0080.02212.67
5.3.220.0030.02112.45
5.3.210.0020.02312.32
5.3.200.0060.02612.52
5.3.190.0050.04112.50
5.3.180.0050.02412.59
5.3.170.0030.02512.60
5.3.160.0050.03812.56
5.3.150.0070.04012.56
5.3.140.0060.02112.38
5.3.130.0000.02812.44
5.3.120.0080.04012.46
5.3.110.0020.02712.52
5.3.100.0030.03512.25
5.3.90.0070.04012.11
5.3.80.0070.03812.03
5.3.70.0060.04012.20
5.3.60.0050.02512.23
5.3.50.0050.03712.05
5.3.40.0110.03612.15
5.3.30.0040.04012.17
5.3.20.0090.03512.07
5.3.10.0050.02111.98
5.3.00.0020.04011.97
5.2.170.0170.02311.13
5.2.160.0030.03711.02
5.2.150.0100.05711.20
5.2.140.0100.05311.04
5.2.130.0100.05711.18
5.2.120.0030.06011.08
5.2.110.0030.03011.21
5.2.100.0030.06011.02
5.2.90.0130.05711.21
5.2.80.0130.05310.98
5.2.70.0070.02311.14
5.2.60.0200.04010.98
5.2.50.0000.03710.90
5.2.40.0000.06711.10
5.2.30.0070.04011.03
5.2.20.0030.06711.01
5.2.10.0100.03710.88
5.2.00.0000.03310.64
5.1.60.0070.0539.87
5.1.50.0030.02710.07
5.1.40.0100.04710.02
5.1.30.0170.04010.33
5.1.20.0130.05010.25
5.1.10.0030.0279.96
5.1.00.0000.02710.13
5.0.50.0030.0239.18
5.0.40.0070.0409.18
5.0.30.0070.0639.18
5.0.20.0000.0409.18
5.0.10.0100.0379.18
5.0.00.0070.0609.18
4.4.90.0100.0239.18
4.4.80.0000.0209.18
4.4.70.0030.0209.18
4.4.60.0030.0339.18
4.4.50.0000.0279.18
4.4.40.0070.0479.18
4.4.30.0030.0279.18
4.4.20.0070.0139.18
4.4.10.0000.0339.18
4.4.00.0000.0579.18
4.3.110.0000.0339.18
4.3.100.0070.0339.18
4.3.90.0100.0279.18
4.3.80.0030.0379.18
4.3.70.0000.0379.18
4.3.60.0030.0339.18
4.3.50.0000.0339.18
4.3.40.0000.0279.18
4.3.30.0000.0339.18
4.3.20.0000.0339.18
4.3.10.0000.0379.18
4.3.00.0070.0279.18

preferences:
50.57 ms | 400 KiB | 5 Q