3v4l.org

run code in 300+ PHP versions simultaneously
<?php // working here $GLOBALS['x'] = "Root of the file"; echo $x; // same things are not working in the function. function checkglobal() { $GLOBALS['z'] = "In the function."; echo $z; } // Run the function checkglobal(); // Echo the variable set in the function echo $z;

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.0130.00318.56
8.3.60.0090.00916.50
8.3.50.0090.00916.47
8.3.40.0160.00618.70
8.3.30.0000.01418.54
8.3.20.0040.00420.34
8.3.10.0030.00522.09
8.3.00.0000.00720.95
8.2.190.0070.01416.58
8.2.180.0090.00618.43
8.2.170.0070.00722.96
8.2.160.0110.00419.33
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00019.38
8.2.120.0040.00426.35
8.2.110.0090.00022.12
8.2.100.0080.00417.91
8.2.90.0080.00017.75
8.2.80.0040.00418.83
8.2.70.0060.00317.75
8.2.60.0080.00017.63
8.2.50.0000.00917.75
8.2.40.0030.00519.35
8.2.30.0070.00019.12
8.2.20.0050.00218.11
8.2.10.0040.00418.18
8.2.00.0030.00618.10
8.1.280.0100.01025.92
8.1.270.0060.00322.08
8.1.260.0140.00426.35
8.1.250.0060.00928.09
8.1.240.0040.00420.25
8.1.230.0090.00317.64
8.1.220.0080.00017.76
8.1.210.0080.00018.77
8.1.200.0030.00517.23
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0040.00417.62
8.1.160.0070.00018.88
8.1.150.0080.00020.68
8.1.140.0040.00419.57
8.1.130.0000.00720.63
8.1.120.0000.00717.31
8.1.110.0040.00417.38
8.1.100.0070.00417.41
8.1.90.0050.00317.35
8.1.80.0000.00717.37
8.1.70.0000.00717.50
8.1.60.0000.00817.59
8.1.50.0050.00317.56
8.1.40.0000.00817.46
8.1.30.0060.00317.53
8.1.20.0000.00817.61
8.1.10.0040.00417.38
8.1.00.0030.00517.37
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0000.00718.27
8.0.270.0070.00017.20
8.0.260.0000.00718.85
8.0.250.0000.00616.99
8.0.240.0040.00416.92
8.0.230.0040.00416.91
8.0.220.0080.00016.78
8.0.210.0030.00316.88
8.0.200.0030.00316.99
8.0.190.0030.00516.95
8.0.180.0030.00516.82
8.0.170.0080.00016.96
8.0.160.0000.00716.88
8.0.150.0070.00016.79
8.0.140.0030.00516.88
8.0.130.0030.00313.35
8.0.120.0020.00516.89
8.0.110.0000.00716.88
8.0.100.0040.00416.93
8.0.90.0040.00416.80
8.0.80.0030.01716.86
8.0.70.0030.00616.82
8.0.60.0000.00816.77
8.0.50.0040.00416.71
8.0.30.0160.00917.04
8.0.20.0120.00817.40
8.0.10.0000.00716.89
8.0.00.0120.00616.72
7.4.330.0000.00515.55
7.4.320.0040.00416.48
7.4.300.0030.00316.50
7.4.290.0040.00416.48
7.4.280.0080.00016.49
7.4.270.0030.00316.43
7.4.260.0080.00016.60
7.4.250.0030.00316.50
7.4.240.0060.00316.60
7.4.230.0030.00316.70
7.4.220.0140.00616.56
7.4.210.0080.00816.61
7.4.200.0000.00816.32
7.4.160.0060.00916.42
7.4.150.0090.01217.40
7.4.140.0100.00917.86
7.4.130.0140.00316.59
7.4.120.0130.00616.62
7.4.110.0120.00616.51
7.4.100.0130.00316.60
7.4.90.0030.01316.40
7.4.80.0060.01019.39
7.4.70.0070.01116.57
7.4.60.0070.01016.66
7.4.50.0070.00716.66
7.4.40.0110.01116.66
7.4.30.0110.00516.55
7.4.00.0070.01115.03
7.3.330.0060.00013.29
7.3.320.0050.00013.37
7.3.310.0040.00416.29
7.3.300.0070.00016.43
7.3.290.0070.00016.44
7.3.280.0090.00816.42
7.3.270.0040.01517.40
7.3.260.0100.00716.56
7.3.250.0090.01216.62
7.3.240.0110.00816.51
7.3.230.0150.00016.52
7.3.210.0100.00716.46
7.3.200.0090.00916.59
7.3.190.0100.00716.65
7.3.180.0110.00416.44
7.3.170.0070.01116.39
7.3.160.0060.00916.50
7.3.120.0100.00715.04
7.3.110.0060.01115.05
7.3.100.0080.00614.74
7.3.90.0030.00915.03
7.3.80.0060.00314.76
7.3.70.0070.00714.84
7.3.60.0070.00714.69
7.3.50.0070.01014.64
7.3.40.0030.00614.95
7.3.30.0000.01314.82
7.3.20.0110.00416.73
7.3.10.0060.00316.41
7.3.00.0080.00016.67
7.2.330.0100.00716.72
7.2.320.0070.01216.51
7.2.310.0030.01316.71
7.2.300.0060.01716.38
7.2.290.0100.01016.70
7.2.250.0000.01814.65
7.2.240.0090.00914.97
7.2.230.0070.01414.98
7.2.220.0000.01315.02
7.2.210.0090.00615.00
7.2.200.0030.01015.04
7.2.190.0100.00314.80
7.2.180.0060.00315.16
7.2.170.0060.00314.87
7.2.60.0250.00816.21
7.1.330.0040.01115.89
7.1.320.0080.00415.93
7.1.310.0070.00315.63
7.1.300.0000.00815.70
7.1.290.0080.00315.44
7.1.280.0110.00415.64
7.1.270.0000.01315.92
7.1.260.0060.00315.58
7.1.200.0150.00315.83
7.1.80.0110.00818.04
7.1.70.0070.00717.33
7.1.60.0230.01035.18
7.1.50.0190.01634.90
7.1.40.0160.01934.42
7.1.30.0230.01334.66
7.1.20.0240.00934.73
7.1.10.0000.01416.48
7.1.00.0030.01416.42
7.0.200.0030.01116.54
7.0.190.0060.01116.68
7.0.180.0100.00716.24
7.0.170.0070.01116.40
7.0.160.0060.00916.37
7.0.150.0100.00616.37
7.0.140.0070.00716.20
7.0.130.0100.00716.54
7.0.120.0110.00716.50
7.0.110.0050.00916.16
7.0.100.0070.00616.47
7.0.90.0040.01116.23
7.0.80.0030.01016.20
7.0.70.0000.01316.21
7.0.60.0070.00715.98
7.0.50.0120.00616.39
7.0.40.0000.01516.48
7.0.30.0020.01516.43
7.0.20.0120.00716.33
7.0.10.0100.00916.54
7.0.00.0100.01016.36

preferences:
66.75 ms | 401 KiB | 5 Q