3v4l.org

run code in 500+ PHP versions simultaneously
<?php function run(string $name) { return $name ?? 'tom'; } var_dump(run('')); function run2(string $name) { return $name ?: 'tom'; } var_dump(run2(''));

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.80.0030.00516.61
8.5.70.0100.00718.37
8.5.60.0070.01116.69
8.5.50.0070.01016.79
8.5.30.0130.00816.67
8.4.230.0150.00719.53
8.4.220.0050.00419.44
8.4.210.0130.00821.34
8.4.90.0050.00317.62
8.3.320.0130.01018.33
8.3.310.0130.00718.30
8.3.180.0090.00916.66
8.3.50.0110.00716.65
8.2.320.0090.01018.10
8.2.310.0120.00618.02

preferences:
45.06 ms | 546 KiB | 5 Q