3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() { $arr = ['u' => 'U']; $x = 'x'; $y = 'y'; $result = (fn () => [$x, $x = 'xx', $x, $y, $arr, $arr['w'] = 'W', $arr, $newvar = 'newvar'])(); var_export(get_defined_vars()); } f();

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.4.120.0110.00522.36
8.4.110.0090.01318.89
8.4.100.0030.00717.98
8.4.90.0090.00117.78
8.4.80.0130.00817.94
8.4.70.0040.00317.77
8.4.60.0130.00919.11
8.4.50.0130.00719.39
8.4.40.0100.01019.29
8.4.30.0160.00420.29
8.4.20.0100.01019.47
8.4.10.0040.00424.13
8.3.250.0050.00318.84
8.3.240.0120.00716.66
8.3.230.0090.00616.63
8.3.220.0100.00717.33
8.3.210.0030.00516.60
8.3.200.0030.00516.60
8.3.190.0120.00817.25
8.3.180.0090.00616.64
8.3.170.0130.00617.15
8.3.160.0040.00416.51
8.3.150.0120.00618.96
8.3.140.0070.01116.69
8.3.130.0090.00916.60
8.3.120.0060.00319.10
8.3.110.0000.00820.94
8.3.100.0090.00024.06
8.3.90.0060.01326.77
8.3.80.0000.00919.36
8.3.70.0070.01416.50
8.3.60.0090.00918.50
8.3.50.0110.01116.85
8.3.40.0080.01221.84
8.3.30.0120.00320.38
8.3.20.0040.00424.18
8.3.10.0060.00324.66
8.3.00.0040.00426.16
8.2.290.0110.00820.68
8.2.280.0070.00118.37
8.2.270.0110.00717.26
8.2.260.0040.00418.84
8.2.250.0070.00316.81
8.2.240.0080.00018.82
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0040.01526.77
8.2.200.0000.00918.88
8.2.190.0130.00616.58
8.2.180.0120.00316.88
8.2.170.0100.00718.95
8.2.160.0140.00022.96
8.2.150.0000.00725.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00419.36
8.2.110.0050.00521.00
8.2.100.0040.00817.91
8.2.90.0000.00817.91
8.2.80.0040.00419.26
8.2.70.0090.00917.38
8.2.60.0190.00017.25
8.2.50.0160.00417.38
8.2.40.0090.00917.13
8.2.30.0070.01017.50
8.2.20.0170.00017.38
8.2.10.0110.00517.38
8.2.00.0110.00617.25
8.1.330.0050.00418.25
8.1.320.0060.01316.22
8.1.310.0040.00416.79
8.1.300.0030.01316.38
8.1.290.0030.00630.84
8.1.280.0170.00325.92
8.1.270.0050.00324.66
8.1.260.0070.00026.35
8.1.250.0150.00328.09
8.1.240.0060.00323.93
8.1.230.0080.00320.92
8.1.220.0050.00317.79
8.1.210.0030.00518.77
8.1.200.0130.00617.13
8.1.190.0120.00617.25
8.1.180.0220.00016.98
8.1.170.0120.00417.09
8.1.160.0160.00017.13
8.1.150.0130.00317.13
8.1.140.0100.00716.99
8.1.130.0140.00217.25
8.1.120.0110.00517.38
8.1.110.0100.00717.38
8.1.100.0140.00317.13
8.1.90.0110.00517.36
8.1.80.0080.00817.13
8.1.70.0100.00717.25
8.1.60.0080.00817.50
8.1.50.0180.00017.38
8.1.40.0140.00717.25
8.1.30.0110.00817.25
8.1.20.0110.00717.13
8.1.10.0110.00717.13
8.1.00.0150.00417.35
8.0.300.0040.00420.04
8.0.290.0160.00016.58
8.0.280.0130.00316.63
8.0.270.0140.00016.59
8.0.260.0100.00716.63
8.0.250.0130.00316.58
8.0.240.0080.00816.58
8.0.230.0100.00716.63
8.0.220.0170.00016.59
8.0.210.0140.00516.58
8.0.200.0130.00516.58
8.0.190.0110.00716.58
8.0.180.0150.00016.58
8.0.170.0170.00016.58
8.0.160.0130.00316.58
8.0.150.0170.00216.58
8.0.140.0120.00416.61
8.0.130.0110.00516.58
8.0.120.0130.00316.58
8.0.110.0120.00316.58
8.0.100.0160.00416.58
8.0.90.0170.00016.58
8.0.80.0160.00016.61
8.0.70.0130.00416.58
8.0.60.0150.00216.58
8.0.50.0110.00516.58
8.0.30.0110.00516.58
8.0.20.0090.00616.63
8.0.10.0080.00816.63

preferences:
29.91 ms | 403 KiB | 5 Q