3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (true) { function test_func1($string) { return $string; } $value = test_func1("defined before"); } echo $value; echo "\n---\n"; if (true) { $value = test_func2("defined after"); function test_func2($string) { return $string; } } echo $value;

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.0000.01518.43
8.3.50.0040.01120.42
8.3.40.0080.00822.02
8.3.30.0140.00019.27
8.3.20.0140.00424.18
8.3.10.0070.00024.66
8.3.00.0070.00026.16
8.2.180.0060.00925.92
8.2.170.0110.00418.92
8.2.160.0090.00922.96
8.2.150.0000.00725.66
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0040.00426.16
8.2.110.0030.00721.12
8.2.100.0060.00618.03
8.2.90.0040.00417.88
8.2.80.0040.00418.69
8.2.70.0000.00817.63
8.2.60.0030.00617.63
8.2.50.0000.00817.98
8.2.40.0040.00418.34
8.2.30.0040.00418.07
8.2.20.0050.00320.44
8.2.10.0030.00518.11
8.2.00.0030.00619.25
8.1.280.0100.00725.92
8.1.270.0090.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00322.14
8.1.230.0070.00422.81
8.1.220.0040.00418.69
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0060.00318.10
8.1.170.0000.00817.62
8.1.160.0040.00418.89
8.1.150.0070.00018.57
8.1.140.0000.00717.46
8.1.130.0000.00818.90
8.1.120.0000.00717.48
8.1.110.0040.00417.41
8.1.100.0000.00717.47
8.1.90.0070.00017.44
8.1.80.0080.00017.41
8.1.70.0000.00717.45
8.1.60.0050.00717.45
8.1.50.0130.00317.38
8.1.40.0090.00317.57
8.1.30.0070.00217.58
8.1.20.0120.00617.55
8.1.10.0150.00317.41
8.1.00.0090.00917.45
8.0.300.0000.00819.89
8.0.290.0060.00216.75
8.0.280.0000.00718.36
8.0.270.0040.00416.85
8.0.260.0040.00418.45
8.0.250.0000.00716.98
8.0.240.0000.00617.02
8.0.230.0000.00716.93
8.0.220.0070.00017.02
8.0.210.0000.00716.86
8.0.200.0050.00316.91
8.0.190.0100.00316.80
8.0.180.0110.00416.91
8.0.170.0060.00616.92
8.0.160.0100.00216.93
8.0.150.0060.00916.71
8.0.140.0060.00216.87
8.0.130.0090.00216.93
8.0.120.0100.00516.91
8.0.110.0080.00416.88
8.0.100.0060.00316.85
8.0.90.0070.00716.82
8.0.80.0090.00616.79
8.0.70.0110.00416.81
8.0.60.0060.00816.92
8.0.50.0060.00916.90
8.0.30.0030.00616.89
8.0.20.0050.00517.05
8.0.10.0050.00516.96
7.4.330.0000.00515.55
7.4.320.0070.00016.61
7.4.300.0060.00016.50
7.4.290.0080.00016.36
7.4.280.0100.00016.45
7.4.270.0110.00016.61
7.4.260.0060.00216.49
7.4.250.0000.00916.54
7.4.240.0090.00016.58
7.4.230.0030.00716.60
7.4.220.0120.00216.57
7.4.210.0090.00516.61
7.4.200.0040.00716.57
7.4.190.0100.00316.68
7.4.180.0120.00316.55
7.4.160.0070.00716.48
7.4.150.0140.00016.58
7.4.140.0070.00716.48
7.4.130.0190.00016.53
7.4.120.0140.00716.38
7.4.110.0110.00316.46
7.4.100.0110.00316.52
7.4.90.0100.00316.45
7.4.80.0000.01516.47
7.4.70.0090.00416.43
7.4.60.0100.00316.55
7.4.50.0000.01416.32
7.4.40.0080.00516.31
7.4.30.0100.00316.56
7.4.20.0090.00016.37
7.4.10.0080.00516.54
7.4.00.0060.00616.54

preferences:
61.83 ms | 400 KiB | 5 Q