3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ['foo']; array_unshift($array, 'bar'); array_unshift($array, 'baz'); var_dump($array); $array = ['foo']; array_unshift($array, 'bar', 'baz'); var_dump($array);

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.0080.00816.75
8.3.50.0150.00020.16
8.3.40.0110.00320.12
8.3.30.0140.00018.67
8.3.20.0070.00024.18
8.3.10.0070.00424.66
8.3.00.0050.00326.16
8.2.180.0040.01125.92
8.2.170.0150.00318.82
8.2.160.0130.00722.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00420.89
8.2.110.0060.00322.20
8.2.100.0060.00322.25
8.1.280.0100.01025.92
8.1.270.0100.00023.99
8.1.260.0030.00526.35
8.1.250.0070.00028.09
8.1.240.0040.00420.30
8.1.230.0070.00318.55
7.4.300.0050.00216.44

preferences:
47.18 ms | 400 KiB | 5 Q