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 = 0; $bar++; echo $bar; // 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.0140.00718.56
8.3.50.0110.00721.08
8.3.40.0100.00718.79
8.3.30.0070.00720.34
8.3.20.0040.00420.39
8.3.10.0040.00422.05
8.3.00.0040.00422.57
8.2.180.0110.01116.63
8.2.170.0180.00422.96
8.2.160.0070.00720.50
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0160.00326.16
8.2.120.0050.00319.54
8.2.110.0030.00621.89
8.2.100.0060.00619.24
8.2.90.0020.00519.21
8.2.80.0040.00419.28
8.2.70.0000.00817.50
8.2.60.0000.00717.93
8.2.50.0000.00818.07
8.2.40.0040.00418.28
8.2.30.0040.00418.19
8.2.20.0040.00417.60
8.2.10.0080.00017.57
8.2.00.0000.00917.75
8.1.280.0170.00325.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00523.91
8.1.230.0080.00418.97
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0080.00017.17
8.1.180.0000.00818.88
8.1.170.0040.00418.66
8.1.160.0040.00422.18
8.1.150.0040.00418.54
8.1.140.0030.00517.45
8.1.130.0000.00717.79
8.1.120.0000.00717.44
8.1.110.0040.00417.46
8.1.100.0060.00317.45
8.1.90.0030.00517.39
8.1.80.0000.00717.39
8.1.70.0030.00317.36
8.1.60.0030.00617.47
8.1.50.0040.00417.35
8.1.40.0050.00217.51
8.1.30.0000.00717.55
8.1.20.0030.00517.66
8.1.10.0040.00417.43
8.1.00.0040.00417.46
8.0.300.0070.00018.77
8.0.290.0050.00317.18
8.0.280.0030.00318.44
8.0.270.0050.00217.25
8.0.260.0000.00616.73
8.0.250.0030.00516.98
8.0.240.0000.00816.90
8.0.230.0000.00717.00
8.0.220.0050.00316.85
8.0.210.0030.00316.88
8.0.200.0000.00616.92
8.0.190.0100.00016.86
8.0.180.0000.00816.85
8.0.170.0000.00816.86
8.0.160.0030.00316.85
8.0.150.0000.00716.86
8.0.140.0040.00416.82
8.0.130.0000.00713.30
8.0.120.0060.00316.88
8.0.110.0040.00416.79
8.0.100.0040.00417.00
8.0.90.0070.00016.89
8.0.80.0040.01116.82
8.0.70.0000.00816.85
8.0.60.0030.00516.80
8.0.50.0070.00016.83
8.0.30.0160.00516.97
8.0.20.0130.00617.40
8.0.10.0050.00316.83
8.0.00.0060.01516.91
7.4.330.0000.00615.00
7.4.320.0050.00216.57
7.4.300.0030.00316.59
7.4.290.0030.00516.48
7.4.280.0000.00716.36
7.4.270.0060.00016.48
7.4.260.0000.00716.61
7.4.250.0000.00816.56
7.4.240.0010.00616.56
7.4.230.0070.00016.63
7.4.220.0090.00916.56
7.4.210.0070.00716.59
7.4.200.0030.00316.71
7.4.190.0060.00316.72
7.4.160.0140.01016.45
7.4.150.0140.00717.40
7.4.140.0080.01217.86
7.4.130.0080.01216.55
7.4.120.0070.01216.48
7.4.110.0080.01216.73
7.4.100.0170.00316.52
7.4.90.0100.00716.38
7.4.80.0180.00619.39
7.4.70.0130.00316.39
7.4.60.0110.00516.47
7.4.50.0030.00616.54
7.4.40.0100.00622.77
7.4.30.0120.00616.50
7.4.00.0080.00914.85
7.3.330.0050.00013.30
7.3.320.0060.00013.16
7.3.310.0040.00416.28
7.3.300.0030.00316.31
7.3.290.0070.01016.32
7.3.280.0070.01016.27
7.3.270.0170.00017.40
7.3.260.0110.00816.43
7.3.250.0110.01016.33
7.3.240.0090.00916.48
7.3.230.0070.01116.55
7.3.210.0040.01216.50
7.3.200.0110.01119.39
7.3.190.0030.01316.29
7.3.180.0030.01716.40
7.3.170.0110.01516.53
7.3.160.0100.00616.64
7.3.120.0100.00614.86
7.3.110.0090.00914.75
7.3.100.0060.00614.83
7.3.90.0060.01014.79
7.3.80.0050.00514.83
7.3.70.0050.00714.86
7.3.60.0070.00514.72
7.3.50.0070.00714.63
7.3.40.0080.00714.74
7.3.30.0060.00614.66
7.3.20.0020.01316.74
7.3.10.0010.01016.58
7.3.00.0050.01016.65
7.2.330.0090.00916.66
7.2.320.0060.01616.59
7.2.310.0070.01016.30
7.2.300.0040.01216.65
7.2.290.0120.00616.54
7.2.250.0020.01614.84
7.2.240.0050.01314.86
7.2.230.0040.01314.82
7.2.220.0050.00715.21
7.2.210.0020.00914.98
7.2.200.0060.00815.11
7.2.190.0060.00914.96
7.2.180.0070.00714.97
7.2.170.0050.00514.88
7.2.160.0070.01015.04
7.2.150.0000.01516.59
7.2.140.0000.01616.93
7.2.130.0070.00416.84
7.2.120.0000.01216.59
7.2.110.0100.00616.79
7.2.100.0110.00416.64
7.2.90.0030.01016.80
7.2.80.0070.00716.97
7.2.70.0000.01216.76
7.2.60.0070.01116.83
7.2.50.0030.00916.71
7.2.40.0030.00616.92
7.2.30.0030.01016.70
7.2.20.0090.00016.66
7.2.10.0040.00716.68
7.2.00.0050.01017.92
7.1.330.0070.01015.60
7.1.320.0030.01115.66
7.1.310.0070.00415.63
7.1.300.0050.00915.67
7.1.290.0050.00615.51
7.1.280.0050.00715.56
7.1.270.0010.01215.37
7.1.260.0050.00515.73
7.1.250.0060.00315.64
7.1.240.0000.01415.51
7.1.230.0040.01115.71
7.1.220.0110.00015.58
7.1.210.0000.01815.48
7.1.200.0090.00315.76
7.1.190.0090.00015.46
7.1.180.0000.01015.75
7.1.170.0000.01415.51
7.1.160.0050.00515.73
7.1.150.0000.01215.66
7.1.140.0040.01115.74
7.1.130.0030.01015.77
7.1.120.0060.00915.57
7.1.110.0030.00715.63
7.1.100.0020.01216.82
7.1.90.0000.01115.74
7.1.80.0030.01015.59
7.1.70.0030.00816.23
7.1.60.0110.00817.41
7.1.50.0110.00616.24
7.1.40.0060.00615.61
7.1.30.0000.00815.50
7.1.20.0040.00715.54
7.1.10.0060.00815.81
7.1.00.0030.04218.92
7.0.330.0000.00814.93
7.0.320.0030.01015.11
7.0.310.0030.00815.27
7.0.300.0030.00915.04
7.0.290.0060.00615.00
7.0.280.0040.00415.28
7.0.270.0070.00415.02
7.0.260.0000.00815.26
7.0.250.0070.00315.02
7.0.240.0030.00515.11
7.0.230.0000.00915.29
7.0.220.0090.00615.30
7.0.210.0070.00715.56
7.0.200.0140.00215.03
7.0.190.0040.01115.20
7.0.180.0070.00715.26
7.0.170.0060.00915.34
7.0.160.0130.00015.39
7.0.150.0050.00515.35
7.0.140.0030.03818.70
7.0.130.0090.00615.27
7.0.120.0030.02918.75
7.0.110.0050.02918.55
7.0.100.0050.02418.56
7.0.90.0100.03118.64
7.0.80.0090.04218.55
7.0.70.0070.03318.65
7.0.60.0030.02718.75
7.0.50.0020.04718.67
7.0.40.0120.03816.67
7.0.30.0070.02316.71
7.0.20.0050.02616.64
7.0.10.0050.03716.76
7.0.00.0140.01916.66
5.6.400.0040.00714.27
5.6.390.0080.00414.40
5.6.380.0070.00314.13
5.6.370.0080.00014.57
5.6.360.0000.01014.10
5.6.350.0030.00814.27
5.6.340.0080.00014.19
5.6.330.0080.00414.20
5.6.320.0000.01214.27
5.6.310.0060.00314.45
5.6.300.0030.01414.14
5.6.290.0000.01614.11
5.6.280.0030.04017.54
5.6.270.0020.02617.47
5.6.260.0080.01917.56
5.6.250.0070.02817.57
5.6.240.0080.02017.60
5.6.230.0060.02017.46
5.6.220.0070.03717.54
5.6.210.0070.03717.58
5.6.200.0050.04717.64
5.6.190.0050.04117.60
5.6.180.0060.02317.59
5.6.170.0070.04517.55
5.6.160.0120.01717.54
5.6.150.0100.04017.62
5.6.140.0090.03117.51
5.6.130.0030.03617.60
5.6.120.0030.02917.67
5.6.110.0100.03217.56
5.6.100.0070.03517.54
5.6.90.0070.03817.53
5.6.80.0100.03817.12
5.6.70.0050.03917.13
5.6.60.0150.03617.30
5.6.50.0090.04017.33
5.6.40.0070.04517.24
5.6.30.0120.02017.22
5.6.20.0060.02517.08
5.6.10.0030.02417.39
5.6.00.0080.03317.28
5.5.380.0100.04015.81
5.5.370.0070.04015.81
5.5.360.0010.02515.85
5.5.350.0050.03315.89
5.5.340.0080.04816.28
5.5.330.0020.02616.18
5.5.320.0030.04016.22
5.5.310.0070.02416.12
5.5.300.0040.04516.13
5.5.290.0090.01916.03
5.5.280.0050.02216.13
5.5.270.0070.03916.21
5.5.260.0090.03515.99
5.5.250.0080.04016.11
5.5.240.0080.03315.57
5.5.230.0050.03515.81
5.5.220.0020.03415.71
5.5.210.0040.04915.89
5.5.200.0090.02215.63
5.5.190.0120.03615.84
5.5.180.0070.03815.78
5.5.170.0040.00814.14
5.5.160.0000.03915.60
5.5.150.0080.03915.73
5.5.140.0060.02015.76
5.5.130.0050.03615.69
5.5.120.0080.03715.84
5.5.110.0090.02915.68
5.5.100.0040.03515.46
5.5.90.0030.02815.79
5.5.80.0070.04115.92
5.5.70.0080.03915.50
5.5.60.0020.04115.58
5.5.50.0120.03015.76
5.5.40.0110.03615.72
5.5.30.0080.04015.81
5.5.20.0030.04015.67
5.5.10.0080.03715.71
5.5.00.0080.02715.73
5.4.450.0050.03714.99
5.4.440.0060.02315.16
5.4.430.0030.04515.13
5.4.420.0070.02215.19
5.4.410.0120.03714.90
5.4.400.0050.03215.02
5.4.390.0050.03514.80
5.4.380.0030.04014.76
5.4.370.0050.03714.99
5.4.360.0100.03115.01
5.4.350.0070.04014.97
5.4.340.0090.02514.86
5.4.330.0030.00910.83
5.4.320.0070.02515.05
5.4.310.0050.03014.96
5.4.300.0100.03314.99
5.4.290.0050.04014.99
5.4.280.0060.02014.90
5.4.270.0130.02815.05
5.4.260.0050.02414.98
5.4.250.0050.03715.08
5.4.240.0020.04014.93
5.4.230.0000.02515.05
5.4.220.0080.03314.70
5.4.210.0030.04415.04
5.4.200.0050.03515.00
5.4.190.0050.04215.07
5.4.180.0030.02915.12
5.4.170.0050.02214.77
5.4.160.0070.03514.97
5.4.150.0050.02514.82
5.4.140.0070.02513.55
5.4.130.0100.03113.51
5.4.120.0090.03213.56
5.4.110.0040.03513.53
5.4.100.0040.03213.64
5.4.90.0090.03713.71
5.4.80.0080.03213.71
5.4.70.0030.02513.57
5.4.60.0030.02413.77
5.4.50.0030.02413.68
5.4.40.0030.02313.64
5.4.30.0060.02013.81
5.4.20.0030.02113.72
5.4.10.0040.02013.53
5.4.00.0060.01713.28
5.3.290.0050.02712.56
5.3.280.0050.04312.67
5.3.270.0030.02412.44
5.3.260.0020.02712.65
5.3.250.0020.03612.59
5.3.240.0030.02212.37
5.3.230.0050.02512.62
5.3.220.0090.03112.47
5.3.210.0020.03712.39
5.3.200.0030.04212.38
5.3.190.0030.04212.36
5.3.180.0030.02112.58
5.3.170.0000.02312.66
5.3.160.0110.01512.56
5.3.150.0050.02012.57
5.3.140.0020.02012.57
5.3.130.0080.01512.56
5.3.120.0020.02212.49
5.3.110.0000.02612.46
5.3.100.0020.02512.29
5.3.90.0020.02212.27
5.3.80.0020.01812.19
5.3.70.0020.02612.15
5.3.60.0000.02312.26
5.3.50.0040.01712.07
5.3.40.0030.02012.07
5.3.30.0020.02712.27
5.3.20.0050.02011.88
5.3.10.0030.01912.01
5.3.00.0030.01812.00
5.2.170.0000.03311.20
5.2.160.0000.03311.22
5.2.150.0070.02011.13
5.2.140.0030.02711.13
5.2.130.0030.03711.09
5.2.120.0030.02711.09
5.2.110.0000.03710.95
5.2.100.0000.03011.10
5.2.90.0000.04711.16
5.2.80.0000.03011.32
5.2.70.0000.03011.21
5.2.60.0000.03011.15
5.2.50.0000.03010.98
5.2.40.0030.02710.85
5.2.30.0030.02710.94
5.2.20.0000.03010.96
5.2.10.0000.03010.82
5.2.00.0000.03010.79
5.1.60.0030.0409.98
5.1.50.0000.0339.98
5.1.40.0000.02310.03
5.1.30.0000.02710.29
5.1.20.0000.02710.37
5.1.10.0000.02710.07
5.1.00.0030.02310.24
5.0.50.0000.0239.66
5.0.40.0000.0209.66
5.0.30.0000.0309.66
5.0.20.0070.0139.66
5.0.10.0030.0279.66
5.0.00.0030.0279.66
4.4.90.0000.0139.66
4.4.80.0000.0179.66
4.4.70.0000.0139.66
4.4.60.0000.0209.66
4.4.50.0000.0179.66
4.4.40.0000.0309.66
4.4.30.0030.0139.66
4.4.20.0000.0139.66
4.4.10.0000.0139.66
4.4.00.0030.0239.66
4.3.110.0030.0109.66
4.3.100.0030.0109.66
4.3.90.0000.0179.66
4.3.80.0030.0209.66
4.3.70.0000.0139.66
4.3.60.0000.0179.66
4.3.50.0000.0239.66
4.3.40.0000.0239.66
4.3.30.0000.0179.66
4.3.20.0000.0339.66
4.3.10.0000.0379.66
4.3.00.0000.0279.66

preferences:
43.07 ms | 401 KiB | 5 Q