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 = 3; // 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.0170.00318.68
8.3.50.0100.00821.27
8.3.40.0100.00718.81
8.3.30.0130.00020.39
8.3.20.0000.00820.16
8.3.10.0000.00721.93
8.3.00.0000.00822.34
8.2.180.0060.01616.50
8.2.170.0140.00722.96
8.2.160.0100.00320.57
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0110.00326.16
8.2.120.0030.00519.76
8.2.110.0040.00422.11
8.2.100.0080.00319.13
8.2.90.0000.00919.25
8.2.80.0050.00319.21
8.2.70.0030.00517.49
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0000.00818.34
8.2.30.0040.00418.18
8.2.20.0040.00417.73
8.2.10.0040.00417.74
8.2.00.0050.00217.61
8.1.280.0180.00325.92
8.1.270.0030.01024.66
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00623.76
8.1.230.0070.00419.17
8.1.220.0060.00317.74
8.1.210.0000.00918.77
8.1.200.0060.00317.23
8.1.190.0000.00817.53
8.1.180.0040.00419.01
8.1.170.0030.00518.29
8.1.160.0030.00322.08
8.1.150.0000.00818.56
8.1.140.0040.00417.39
8.1.130.0040.00417.74
8.1.120.0000.00717.53
8.1.110.0030.00517.46
8.1.100.0050.00317.31
8.1.90.0070.00017.29
8.1.80.0000.00717.30
8.1.70.0000.00717.32
8.1.60.0030.00617.46
8.1.50.0040.00417.54
8.1.40.0030.00517.42
8.1.30.0030.00617.61
8.1.20.0040.00417.66
8.1.10.0040.00417.57
8.1.00.0040.00417.43
8.0.300.0070.00018.77
8.0.290.0040.00417.18
8.0.280.0030.00318.32
8.0.270.0030.00317.36
8.0.260.0000.00616.73
8.0.250.0030.00316.92
8.0.240.0080.00016.93
8.0.230.0040.00416.82
8.0.220.0000.00716.79
8.0.210.0030.00316.91
8.0.200.0030.00316.84
8.0.190.0000.00916.91
8.0.180.0000.00716.96
8.0.170.0000.00716.89
8.0.160.0000.00716.91
8.0.150.0070.00016.73
8.0.140.0000.00716.88
8.0.130.0030.00313.35
8.0.120.0040.00416.82
8.0.110.0060.00316.91
8.0.100.0090.00016.88
8.0.90.0040.00416.94
8.0.80.0070.01116.84
8.0.70.0070.00016.93
8.0.60.0040.00416.79
8.0.50.0000.00716.96
8.0.30.0100.00817.17
8.0.20.0110.00817.40
8.0.10.0000.00716.80
8.0.00.0080.01016.88
7.4.330.0000.00615.00
7.4.320.0060.00016.51
7.4.300.0030.00316.59
7.4.290.0000.00716.54
7.4.280.0000.00716.53
7.4.270.0030.00316.61
7.4.260.0070.00016.51
7.4.250.0000.00716.46
7.4.240.0000.00716.50
7.4.230.0030.00316.63
7.4.220.0060.01216.55
7.4.210.0070.00916.60
7.4.200.0000.00716.69
7.4.190.0040.00416.38
7.4.160.0070.00716.36
7.4.150.0070.01117.40
7.4.140.0110.00917.86
7.4.130.0150.00716.36
7.4.120.0100.00816.57
7.4.110.0030.01616.39
7.4.100.0120.00616.57
7.4.90.0030.01416.48
7.4.80.0150.00919.39
7.4.70.0030.01816.48
7.4.60.0120.00316.48
7.4.50.0000.00516.53
7.4.40.0080.00822.77
7.4.30.0110.00616.21
7.4.00.0050.01114.70
7.3.330.0030.00313.37
7.3.320.0050.00013.13
7.3.310.0050.00216.11
7.3.300.0040.00416.24
7.3.290.0090.00616.23
7.3.280.0070.00816.28
7.3.270.0090.00917.40
7.3.260.0190.00016.56
7.3.250.0110.01116.45
7.3.240.0070.01116.33
7.3.230.0030.01416.39
7.3.210.0090.00916.45
7.3.200.0070.01019.39
7.3.190.0100.00716.36
7.3.180.0060.01016.45
7.3.170.0050.01116.29
7.3.160.0080.00916.63
7.3.120.0070.00714.81
7.3.110.0040.01314.85
7.3.100.0080.00314.94
7.3.90.0030.00914.79
7.3.80.0020.01214.69
7.3.70.0050.00814.71
7.3.60.0040.00914.93
7.3.50.0080.00714.80
7.3.40.0070.00414.70
7.3.30.0050.00714.80
7.3.20.0020.01116.63
7.3.10.0060.00616.66
7.3.00.0070.00316.75
7.2.330.0070.01016.36
7.2.320.0140.00516.75
7.2.310.0080.00816.59
7.2.300.0050.01116.67
7.2.290.0140.00916.42
7.2.250.0060.00914.89
7.2.240.0020.01414.97
7.2.230.0070.00914.73
7.2.220.0060.00614.95
7.2.210.0040.00914.95
7.2.200.0040.00714.97
7.2.190.0060.00614.92
7.2.180.0030.01015.09
7.2.170.0060.00714.94
7.2.160.0070.00714.79
7.2.150.0070.00716.88
7.2.140.0090.00616.81
7.2.130.0050.00716.77
7.2.120.0050.00916.78
7.2.110.0040.00616.74
7.2.100.0060.00716.87
7.2.90.0040.00916.79
7.2.80.0090.00516.92
7.2.70.0040.00816.88
7.2.60.0050.01016.92
7.2.50.0080.00816.63
7.2.40.0070.00916.88
7.2.30.0070.00916.82
7.2.20.0050.01216.84
7.2.10.0020.01316.76
7.2.00.0020.01116.82
7.1.330.0040.00915.64
7.1.320.0040.00815.44
7.1.310.0050.00715.81
7.1.300.0000.01015.71
7.1.290.0050.00815.61
7.1.280.0040.00815.73
7.1.270.0060.00515.66
7.1.260.0050.00615.70
7.1.250.0070.00515.72
7.1.70.0040.00716.79
7.1.60.0060.01919.29
7.1.50.0000.02316.86
7.1.00.0030.07022.40
7.0.200.0810.01014.71
7.0.140.0000.07322.08
7.0.60.0100.07720.09
7.0.50.0000.06017.91
7.0.40.0070.08720.27
7.0.30.0270.06720.24
7.0.20.0300.07720.25
7.0.10.0100.08720.10
7.0.00.0030.04320.35
5.6.280.0100.06721.15
5.6.210.0100.07720.61
5.6.200.0100.07718.29
5.6.190.0000.05020.43
5.6.180.0500.06720.46
5.6.170.0230.04320.39
5.6.160.0100.06020.55
5.6.150.0000.07018.15
5.6.140.0070.07718.15
5.6.130.0100.04318.16
5.6.120.0130.07720.93
5.6.110.0100.07320.98
5.6.100.0100.07721.07
5.6.90.0070.08721.03
5.6.80.0130.06720.51
5.5.350.0130.04720.46
5.5.340.0030.08318.07
5.5.330.0030.06320.27
5.5.320.0430.07720.35
5.5.310.0170.05020.34
5.5.300.0030.05318.01
5.5.290.0100.08317.97
5.5.280.0100.08020.94
5.5.270.0100.04020.89
5.5.260.0000.04320.68
5.5.250.0100.07320.71
5.5.240.0070.04720.26
5.4.450.0800.05719.52
5.4.440.0700.06319.34
5.4.430.0800.07719.19
5.4.420.0770.05719.54
5.4.410.0870.04719.34
5.4.400.0770.05719.29
5.4.390.0770.06019.03
5.4.380.0200.06018.56
5.4.370.0030.04718.67
5.4.360.0070.05018.76
5.4.350.0080.03412.02
5.4.340.0080.03512.02
5.4.320.0070.03612.50
5.4.310.0070.04712.50
5.4.300.0050.04312.50
5.4.290.0040.04012.50
5.4.280.0040.03712.39
5.4.270.0030.04512.40
5.4.260.0080.05412.40
5.4.250.0130.04718.66
5.4.240.0070.05318.80
5.4.230.0300.05018.88
5.4.220.0070.05318.74
5.4.210.0170.04018.66
5.4.200.0100.05018.89
5.4.190.0070.05318.73
5.4.180.0070.05018.99
5.4.170.0130.04718.71
5.4.160.0030.05318.92
5.4.150.0070.05718.89
5.4.140.0130.04316.39
5.4.130.0100.04316.42
5.4.120.0100.05016.39
5.4.110.0130.04316.41
5.4.100.0100.06716.33
5.4.90.0030.05316.24
5.4.80.0030.05316.29
5.4.70.0030.05016.30
5.4.60.0070.05016.21
5.4.50.0000.05316.21
5.4.40.0130.04316.51
5.4.30.0030.05316.52
5.4.20.0100.04716.37
5.4.10.0100.04716.37
5.4.00.0030.05315.84
5.3.290.0080.04812.80
5.3.280.0130.04714.67
5.3.270.0070.05714.76
5.3.260.0130.04314.60
5.3.250.0070.04714.78
5.3.240.0100.04714.62
5.3.230.0100.04714.75
5.3.220.0030.05314.56
5.3.210.0030.05314.74
5.3.200.0100.04314.60
5.3.190.0130.04314.56
5.3.180.0030.06714.54
5.3.170.0070.05014.53
5.3.160.0100.04714.72
5.3.150.0000.05314.46
5.3.140.0030.05014.54
5.3.130.0030.05314.51
5.3.120.0030.05314.67
5.3.110.0000.05714.51
5.3.100.0170.04314.16
5.3.90.0100.04714.08
5.3.80.0100.04714.09
5.3.70.0130.04314.20
5.3.60.0130.04013.83
5.3.50.0030.05313.96
5.3.40.0070.05014.02
5.3.30.0100.04714.07
5.3.20.0070.04713.77
5.3.10.0070.05013.63
5.3.00.0070.04713.47
5.2.170.0070.04011.20
5.2.160.0070.03711.13
5.2.150.0070.04311.00
5.2.140.0070.03711.12
5.2.130.0000.04311.05
5.2.120.0070.04711.16
5.2.110.0030.04011.05
5.2.100.0000.04311.16
5.2.90.0000.04311.25
5.2.80.0070.04011.08
5.2.70.0130.03311.16
5.2.60.0000.04711.02
5.2.50.0030.04011.02
5.2.40.0030.04010.97
5.2.30.0000.04311.07
5.2.20.0000.04310.93
5.2.10.0070.03710.94
5.2.00.0200.03310.70
5.1.60.0000.03710.24
5.1.50.0070.03310.05
5.1.40.0070.03010.22
5.1.30.0100.04010.31
5.1.20.0000.04010.52
5.1.10.0030.03310.16
5.1.00.0000.03710.05
5.0.50.0030.0278.78
5.0.40.0030.0278.20
5.0.30.0030.0408.29
5.0.20.0000.0278.39
5.0.10.0030.0278.23
5.0.00.0030.0408.00
4.4.90.0030.0307.66
4.4.80.0070.0177.66
4.4.70.0030.0177.66
4.4.60.0070.0177.66
4.4.50.0030.0237.66
4.4.40.0030.0337.66
4.4.30.0000.0207.66
4.4.20.0000.0237.66
4.4.10.0030.0177.66
4.4.00.0030.0337.66
4.3.110.0030.0207.66
4.3.100.0000.0207.66
4.3.90.0030.0177.66
4.3.80.0070.0307.66
4.3.70.0000.0307.66
4.3.60.0000.0237.66
4.3.50.0000.0237.66
4.3.40.0030.0307.66
4.3.30.0000.0237.66
4.3.20.0000.0307.66
4.3.10.0000.0237.66
4.3.00.0130.0237.29

preferences:
46.66 ms | 401 KiB | 5 Q