3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = str_repeat('[', 5_000_000) . '1' . str_repeat(']', 5_000_000); echo 'Input length: ', number_format(strlen($input) / 1024 / 1024, 3, ',', '.') . ' MiB', PHP_EOL; echo 'Memory before: ', number_format(memory_get_peak_usage(true) / 1024 / 1024, 3, ',', '.') . ' MiB', PHP_EOL; $output = json_decode($input); echo 'Memory after: ', number_format(memory_get_peak_usage(true) / 1024 / 1024, 3, ',', '.') . ' MiB', PHP_EOL;

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.5.20.0260.01334.40
8.5.10.0130.00733.79
8.5.00.0280.01333.98
8.4.170.0280.01238.25
8.4.160.0280.01438.17
8.4.150.0010.00114.05
8.4.140.0460.00531.75
8.4.130.0350.00832.22
8.4.120.0210.00634.69
8.4.110.0300.01133.19
8.4.100.0370.01131.91
8.4.90.0350.00731.82
8.4.80.0220.00831.71
8.4.70.0300.00533.61
8.4.60.0160.00533.70
8.4.50.0440.00931.95
8.4.40.0550.01231.66
8.4.30.0460.01331.58
8.4.20.0520.00731.64
8.4.10.0460.01031.51
8.3.300.0290.01135.08
8.3.290.0260.01535.16
8.3.280.0290.01132.64
8.3.270.0300.01530.74
8.3.260.0300.00830.62
8.3.250.0350.00733.29
8.3.240.0280.00730.72
8.3.230.0350.00730.66
8.3.220.0300.00931.44
8.3.210.0140.00430.65
8.3.200.0330.01030.75
8.3.190.0420.00230.70
8.3.180.0250.00630.83
8.3.170.0310.00730.57
8.3.160.0280.00530.58
8.3.150.0400.01130.70
8.3.140.0460.00930.81
8.3.130.0460.01630.40
8.3.120.0400.00630.60
8.3.110.0440.00930.50
8.3.100.0490.00730.60
8.3.90.0260.00431.02
8.3.80.0610.00730.72
8.3.70.0390.01030.63
8.3.60.0350.01630.76
8.3.50.0390.00730.72
8.3.40.0400.01331.62
8.3.30.0390.01031.63
8.3.20.0400.01131.64
8.3.10.0450.01131.87
8.3.00.0160.00631.63
8.2.300.0360.01132.11
8.2.290.0320.01034.59
8.2.280.0370.01030.93
8.2.270.0230.00630.63
8.2.260.0250.01030.75
8.2.250.0310.00630.30
8.2.240.0420.00630.62
8.2.230.0490.01030.83
8.2.220.0460.01230.66
8.2.210.0500.01030.79
8.2.200.0220.00530.77
8.2.190.0250.00530.63
8.2.180.0430.00830.72
8.2.170.0560.00631.98
8.2.160.0290.00131.85
8.2.150.0380.00831.65
8.2.140.0370.00231.81
8.2.130.0570.00831.64
8.2.120.0300.00331.72
8.2.110.0440.01031.74
8.2.100.0510.01431.84
8.2.90.0270.00331.79
8.2.80.0260.00331.61
8.2.70.0270.00331.82
8.2.60.0210.00831.61
8.2.50.0160.00631.69
8.2.40.0160.00731.81
8.2.30.0150.00731.68
8.2.20.0430.00431.54
8.2.10.0170.00831.74
8.2.00.0210.00331.69
8.1.340.0330.00733.86

preferences:
52.63 ms | 403 KiB | 5 Q