3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name = 'mickmackusa'; $yob = fn(?int $age): ?int => !$age ? null : ( fn($birthYear) => (print "$name's birth year is $birthYear\n") ? $birthYear : null )(date('Y') - $age); var_export($yob(null)); echo "\n---\n"; var_export($yob(31));

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.30.0090.00918.02
8.5.20.0100.00819.99
8.5.10.0090.01016.99
8.5.00.0110.01020.36
8.4.180.0160.01020.75
8.4.170.0150.00623.67
8.4.160.0120.00923.93
8.4.150.0050.00816.78
8.4.140.0120.00817.60
8.4.130.0130.00717.83
8.4.120.0100.01020.77
8.4.110.0440.01017.68
8.4.100.0430.00817.85
8.4.90.0400.00917.91
8.4.80.0380.00917.90
8.4.70.0420.00918.03
8.4.60.0430.00918.02
8.4.50.0450.00917.71
8.4.40.0410.01117.70
8.4.30.0470.00717.55
8.4.20.0470.00917.66
8.4.10.0390.00917.60
8.3.300.0130.00918.51
8.3.290.0070.01420.91
8.3.280.0130.00718.61
8.3.270.0140.00616.56
8.3.260.0100.01016.82
8.3.250.0090.00618.92
8.3.240.0240.00716.71
8.3.230.0170.00616.63
8.3.220.0270.00416.47
8.3.210.0240.00316.41
8.3.200.0250.00916.68
8.3.190.0320.01016.60
8.3.180.0330.00416.54
8.3.170.0190.00416.71
8.3.160.0240.01116.22
8.3.150.0370.01216.53
8.3.140.0470.00316.73
8.3.130.0370.00616.76
8.3.120.0410.00516.45
8.3.110.0340.01016.68
8.3.100.0230.00616.58
8.3.90.0190.00516.83
8.3.80.0190.00516.51
8.3.70.0300.00516.52
8.3.60.0300.00516.62
8.3.50.0180.00616.66
8.3.40.0250.00317.65
8.3.30.0140.00517.47
8.3.20.0150.00617.75
8.3.10.0140.00417.84
8.3.00.0320.00917.41
8.2.300.0110.00822.01
8.2.290.0330.00816.51
8.2.280.0200.00616.99
8.2.270.0290.00616.86
8.2.260.0180.00416.57
8.2.250.0250.00416.40
8.2.240.0160.00516.82
8.2.230.0140.00716.59
8.2.220.0160.00416.43
8.2.210.0140.00716.68
8.2.200.0190.00216.33
8.2.190.0140.00716.43
8.2.180.0190.00216.68
8.2.170.0220.00417.67
8.2.160.0200.00517.68
8.2.150.0210.00617.53
8.2.140.0180.00817.47
8.2.130.0170.00417.49
8.2.120.0190.00417.70
8.2.110.0200.00417.48
8.2.100.0220.00217.60
8.2.90.0180.00517.39
8.2.80.0180.00517.69
8.2.70.0160.00717.56
8.2.60.0200.00417.28
8.2.50.0190.00417.44
8.2.40.0200.00417.46
8.2.30.0190.00817.27
8.2.20.0170.00617.33
8.2.10.0170.00517.52
8.2.00.0180.00417.38
8.1.340.0120.00817.74

preferences:
42.76 ms | 837 KiB | 5 Q