3v4l.org

run code in 300+ PHP versions simultaneously
<html> <body> <?php $x=15; // global scope function myTest() { $y=25; // local scope echo "<p>Test variables inside the function:</p>"; echo "Variable x is: $x"; echo "<br>"; echo "Variable y is: $y"; } myTest(); echo "<p>Test variables outside the function:</p>"; echo "Variable x is: $x"; echo "<br>"; echo "Variable y is: $y"; ?> </body> </html>

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.0040.01116.93
8.3.60.0170.00316.50
8.3.50.0250.00822.10
8.3.40.0070.00718.84
8.3.30.0110.00419.09
8.3.20.0050.00320.25
8.3.10.0000.00823.69
8.3.00.0000.00822.41
8.2.190.0110.00718.25
8.2.180.0090.00916.63
8.2.170.0140.00722.96
8.2.160.0030.01022.02
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0000.00822.21
8.2.110.0060.00322.12
8.2.100.0040.00817.64
8.2.90.0030.00619.11
8.2.80.0050.00317.97
8.2.70.0000.00917.75
8.2.60.0080.00017.93
8.2.50.0030.00618.07
8.2.40.0060.00319.27
8.2.30.0000.00718.06
8.2.20.0040.00417.64
8.2.10.0000.00819.34
8.2.00.0040.00417.73
8.1.280.0100.00725.92
8.1.270.0050.00323.91
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00423.95
8.1.230.0060.00619.09
8.1.220.0000.00817.79
8.1.210.0030.00618.77
8.1.200.0040.00417.23
8.1.190.0040.00417.40
8.1.180.0080.00018.10
8.1.170.0000.00818.52
8.1.160.0030.00421.86
8.1.150.0040.00418.57
8.1.140.0000.00717.29
8.1.130.0070.00017.66
8.1.120.0000.00717.39
8.1.110.0040.00417.40
8.1.100.0070.00017.28
8.1.90.0030.00317.29
8.1.80.0000.00917.42
8.1.70.0070.00017.25
8.1.60.0000.00917.59
8.1.50.0040.00417.38
8.1.40.0040.00417.39
8.1.30.0040.00417.62
8.1.20.0040.00417.61
8.1.10.0000.00717.50
8.1.00.0040.00417.46
8.0.300.0040.00418.77
8.0.290.0000.00817.18
8.0.280.0050.00318.35
8.0.270.0030.00317.26
8.0.260.0080.00016.88
8.0.250.0030.00316.95
8.0.240.0000.00716.97
8.0.230.0040.00417.05
8.0.220.0030.00316.99
8.0.210.0040.00416.86
8.0.200.0070.00016.89
8.0.190.0040.00416.98
8.0.180.0000.00816.98
8.0.170.0000.00817.02
8.0.160.0050.00316.96
8.0.150.0030.00516.96
8.0.140.0030.00416.95
8.0.130.0000.00613.34
8.0.120.0040.00416.89
8.0.110.0040.00416.84
8.0.100.0000.00717.01
8.0.90.0000.00716.86
8.0.80.0060.01016.90
8.0.70.0040.00416.79
8.0.60.0070.00016.67
8.0.50.0050.00316.77
8.0.30.0100.00817.07
8.0.20.0120.01117.40
8.0.10.0030.00316.95
8.0.00.0130.00516.69
7.4.330.0030.00315.07
7.4.320.0020.00516.49
7.4.300.0000.00716.51
7.4.290.0000.00716.60
7.4.280.0030.00616.48
7.4.270.0000.00816.49
7.4.260.0070.00016.40
7.4.250.0080.00016.57
7.4.240.0020.00516.39
7.4.230.0000.00716.39
7.4.220.0140.00316.64
7.4.210.0070.01016.63
7.4.200.0030.00316.68
7.4.190.0070.00016.45
7.4.160.0080.00816.39
7.4.150.0140.00317.40
7.4.140.0090.01017.86
7.4.130.0120.00516.50
7.4.120.0100.00816.58
7.4.110.0110.00716.67
7.4.100.0180.00016.52
7.4.90.0070.01016.61
7.4.80.0090.00916.65
7.4.70.0090.01216.65
7.4.60.0070.01016.63
7.4.50.0000.00716.40
7.4.40.0000.01422.77
7.4.30.0090.00616.64
7.4.00.0070.01015.02
7.3.330.0030.00313.38
7.3.320.0000.00513.16
7.3.310.0040.00416.18
7.3.300.0030.00316.25
7.3.290.0060.01216.41
7.3.280.0070.01216.33
7.3.270.0130.01317.40
7.3.260.0110.00616.19
7.3.250.0150.00516.49
7.3.240.0140.00716.31
7.3.230.0090.00916.39
7.3.210.0140.00316.46
7.3.200.0030.01919.39
7.3.190.0130.00916.55
7.3.180.0090.00616.62
7.3.170.0080.00816.53
7.3.160.0100.00616.50
7.3.120.0050.01314.90
7.3.110.0060.01215.03
7.3.100.0000.01414.73
7.3.90.0070.00714.88
7.3.80.0090.00314.80
7.3.70.0030.01414.55
7.3.60.0000.01114.93
7.3.50.0080.00814.81
7.3.40.0090.00014.86
7.3.30.0080.00614.82
7.3.20.0030.00916.66
7.3.10.0050.00916.54
7.3.00.0050.00716.54
7.2.330.0110.00816.73
7.2.320.0100.01316.62
7.2.310.0060.01016.42
7.2.300.0090.01316.74
7.2.290.0130.00316.43
7.2.250.0070.01015.05
7.2.240.0130.00315.00
7.2.230.0070.00715.16
7.2.220.0090.00614.96
7.2.210.0070.00714.80
7.2.200.0060.00914.71
7.2.190.0000.01614.68
7.2.180.0070.01114.91
7.2.170.0040.01014.99
7.2.130.0120.00216.60
7.2.120.0070.00716.67
7.2.110.0070.00916.64
7.2.100.0050.00816.80
7.2.90.0070.00516.69
7.2.80.0090.00516.53
7.2.70.0110.00316.79
7.2.60.0080.00716.82
7.2.50.0120.00416.75
7.2.40.0010.01316.70
7.2.30.0060.00616.79
7.2.20.0090.00316.85
7.2.10.0080.00816.65
7.2.00.0070.01017.57
7.1.330.0110.00015.61
7.1.320.0060.00615.68
7.1.310.0060.00815.68
7.1.300.0110.00315.59
7.1.290.0060.00315.69
7.1.280.0000.01515.76
7.1.270.0100.00315.49
7.1.260.0030.01015.76
7.1.250.0060.01015.46
7.1.100.0000.01417.93
7.1.70.0060.00316.94
7.1.60.0030.02019.29
7.1.50.0250.01234.43
7.1.00.0030.07722.36
7.0.200.0030.00716.87
7.0.140.0070.07021.93
7.0.110.0200.08320.00
7.0.100.0300.08719.97
7.0.90.0200.05020.05
7.0.80.0230.07319.97
7.0.70.0070.05319.93
7.0.60.0130.07319.91
7.0.50.0030.09019.99
7.0.40.0100.07319.73
7.0.30.0070.08019.74
7.0.20.0070.07019.81
7.0.10.0030.05019.75
7.0.00.0100.05719.71
5.6.280.0000.07720.86
5.6.260.0030.06720.59
5.6.250.0070.08020.68
5.6.240.0070.05020.48
5.6.230.0200.03720.57
5.6.220.0130.06320.68
5.6.210.0130.04320.66
5.6.200.0230.06020.62
5.6.190.0130.07320.62
5.6.180.0070.05020.56
5.6.170.0070.07720.69
5.6.160.0100.08020.85
5.6.150.0030.08320.71
5.6.140.0000.09020.85
5.6.130.0000.08720.66
5.6.120.0070.08320.56
5.6.110.0130.08020.55
5.6.100.0100.08020.58
5.6.90.0100.08320.59
5.6.80.0100.06019.86
5.6.70.0030.08320.00
5.6.60.0100.07720.03
5.6.50.0030.08019.94
5.6.40.0170.04319.83
5.6.30.0100.07719.98
5.6.20.0100.07319.92
5.6.10.0030.08319.96
5.6.00.0100.07720.06
5.5.380.0100.07720.55
5.5.370.0100.03720.58
5.5.360.0200.07020.57
5.5.350.0130.07720.41
5.5.340.0030.07720.95
5.5.330.0030.06320.94
5.5.320.0170.07020.95
5.5.310.0130.04320.78
5.5.300.0070.08720.96
5.5.290.0130.08020.87
5.5.280.0100.07720.99
5.5.270.0100.04720.80
5.5.260.0130.07720.80
5.5.250.0070.07720.75
5.5.240.0200.06320.34
5.5.230.0030.05020.28
5.5.220.0030.08020.39
5.5.210.0000.08720.12
5.5.200.0070.07720.16
5.5.190.0030.05320.31
5.5.180.0070.08020.23
5.5.160.0130.07020.16
5.5.150.0100.06320.32
5.5.140.0100.04320.33
5.5.130.0100.08020.05
5.5.120.0030.07320.30
5.5.110.0070.07720.36
5.5.100.0130.05320.27
5.5.90.0100.08020.05
5.5.80.0130.06719.98
5.5.70.0130.04720.24
5.5.60.0130.04020.24
5.5.50.0070.05720.02
5.5.40.0100.07720.03
5.5.30.0030.07719.95
5.5.20.0030.05320.17
5.5.10.0100.08020.11
5.5.00.0170.07020.16
5.4.450.0170.07319.64
5.4.440.0170.04019.55
5.4.430.0130.07019.32
5.4.420.0030.08319.30
5.4.410.0030.05019.23
5.4.400.0130.07319.27
5.4.390.0070.06719.17
5.4.380.0100.07718.96
5.4.370.0100.07319.18
5.4.360.0000.08318.98
5.4.350.0130.07019.00
5.4.340.0070.07019.03
5.4.320.0130.07019.25
5.4.310.0100.07319.00
5.4.300.0070.05319.23
5.4.290.0030.04719.03
5.4.280.0100.07019.31
5.4.270.0070.07318.95
5.4.260.0000.08319.20
5.4.250.0070.07719.16
5.4.240.0100.07319.00
5.4.230.0030.07319.30
5.4.220.0130.06319.23
5.4.210.0070.07019.01
5.4.200.0070.07019.02
5.4.190.0030.07019.13
5.4.180.0070.07319.08
5.4.170.0100.06318.98
5.4.160.0070.07719.01
5.4.150.0070.06318.93
5.4.140.0100.07016.43
5.4.130.0100.03016.53
5.4.120.0000.04016.29
5.4.110.0030.06016.47
5.4.100.0000.04016.61
5.4.90.0030.06016.54
5.4.80.0070.03316.45
5.4.70.0000.05716.39
5.4.60.0070.04316.54
5.4.50.0070.04016.39
5.4.40.0030.03716.44
5.4.30.0030.03316.43
5.4.20.0030.07016.33
5.4.10.0000.05016.38
5.4.00.0070.05015.96
5.3.290.0100.06714.66
5.3.280.0070.07014.60
5.3.270.0100.07314.58
5.3.260.0200.05314.59
5.3.250.0070.07714.62
5.3.240.0070.04014.61
5.3.230.0100.04314.68
5.3.220.0000.05014.55
5.3.210.0070.03714.54
5.3.200.0030.03714.61
5.3.190.0070.05014.59
5.3.180.0030.05314.54
5.3.170.0030.05014.58
5.3.160.0000.04014.41
5.3.150.0070.03314.52
5.3.140.0000.04014.63
5.3.130.0030.04714.55
5.3.120.0000.04014.55
5.3.110.0000.04714.52
5.3.100.0000.03713.90
5.3.90.0030.05314.05
5.3.80.0030.05714.06
5.3.70.0030.04013.97
5.3.60.0000.04714.02
5.3.50.0000.04014.01
5.3.40.0070.04713.95
5.3.30.0030.03313.98
5.3.20.0000.03713.66
5.3.10.0100.02713.68
5.3.00.0000.04013.67
5.2.170.0000.03012.31
5.2.160.0000.03012.31
5.2.150.0000.04012.31
5.2.140.0070.02712.31
5.2.130.0030.02712.31
5.2.120.0030.02712.31
5.2.110.0000.03012.31
5.2.100.0030.02712.31
5.2.90.0030.02312.31
5.2.80.0000.03712.31
5.2.70.0070.02312.31
5.2.60.0000.03012.31
5.2.50.0000.03012.31
5.2.40.0030.02712.31
5.2.30.0000.03012.31
5.2.20.0000.03012.31
5.2.10.0000.03012.31
5.2.00.0000.03312.31
5.1.60.0100.04012.31
5.1.50.0030.02312.31
5.1.40.0030.03712.31
5.1.30.0000.02712.31
5.1.20.0000.02712.31
5.1.10.0030.02312.31
5.1.00.0070.02012.31
5.0.50.0030.01712.31
5.0.40.0070.01312.31
5.0.30.0000.03012.31
5.0.20.0000.02012.31
5.0.10.0000.02012.31
5.0.00.0030.04012.31
4.4.90.0030.01712.31
4.4.80.0030.01312.31
4.4.70.0000.01712.31
4.4.60.0030.02312.31
4.4.50.0000.01312.31
4.4.40.0000.02312.31
4.4.30.0030.01312.31
4.4.20.0000.01712.31
4.4.10.0000.02312.31
4.4.00.0030.02712.31
4.3.110.0000.01712.31
4.3.100.0000.01712.31
4.3.90.0000.01312.31
4.3.80.0000.03312.31
4.3.70.0030.02712.31
4.3.60.0030.01312.31
4.3.50.0000.01712.31
4.3.40.0000.02312.31
4.3.30.0000.01712.31
4.3.20.0000.02312.31
4.3.10.0030.03312.31
4.3.00.0000.03312.31

preferences:
41.71 ms | 401 KiB | 5 Q