3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_leap_year(int $year) :bool { return $year % 4 == 0 and ($year % 100 != 0 or $year % 400 == 0); } $year = 2016; var_dump(is_leap_year($year) === date('L', $year)); # true $year = 2018; var_dump(is_leap_year($year) === date('L', $year)); # false

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.0140.00718.38
8.3.50.0100.00318.21
8.3.40.0110.00418.94
8.3.30.0150.00018.63
8.3.20.0050.00518.76
8.3.10.0040.00423.65
8.3.00.0080.00019.91
8.2.180.0110.00418.20
8.2.170.0000.01522.96
8.2.160.0120.00422.12
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0070.00026.16
8.2.120.0050.00320.02
8.2.110.0060.00322.06
8.2.100.0000.01217.91
8.2.90.0040.00417.75
8.2.80.0030.00518.95
8.2.70.0040.00417.79
8.2.60.0030.00517.93
8.2.50.0070.00018.10
8.2.40.0040.00422.38
8.2.30.0020.00519.40
8.2.20.0040.00418.14
8.2.10.0000.00718.05
8.2.00.0030.00318.35
8.1.280.0150.00625.92
8.1.270.0040.00420.08
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0040.00423.79
8.1.230.0080.00320.89
8.1.220.0080.00017.79
8.1.210.0080.00018.77
8.1.200.0000.00917.35
8.1.190.0000.00817.53
8.1.180.0040.00418.10
8.1.170.0040.00418.90
8.1.160.0050.00319.00
8.1.150.0070.00020.25
8.1.140.0040.00417.68
8.1.130.0030.00319.08
8.1.120.0030.00317.49
8.1.110.0060.00317.64
8.1.100.0060.00317.59
8.1.90.0050.00317.46
8.1.80.0000.00817.57
8.1.70.0040.00417.52
8.1.60.0080.00317.61
8.1.50.0070.00017.57
8.1.40.0070.00017.61
8.1.30.0000.00817.66
8.1.20.0000.00817.66
8.1.10.0000.00717.67
8.1.00.0000.00717.63
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0040.00418.48
8.0.270.0070.00017.22
8.0.260.0030.00316.87
8.0.250.0000.00717.10
8.0.240.0030.00617.11
8.0.230.0080.00017.11
8.0.220.0000.00717.05
8.0.210.0030.00317.02
8.0.200.0070.00017.02
8.0.190.0040.00417.07
8.0.180.0050.00216.91
8.0.170.0030.00617.00
8.0.160.0000.00816.88
8.0.150.0000.01016.96
8.0.140.0030.00316.86
8.0.130.0050.00013.28
8.0.120.0000.00716.96
8.0.110.0040.00416.95
8.0.100.0000.00816.98
8.0.90.0070.00017.08
8.0.80.0100.01016.96
8.0.70.0000.00817.02
8.0.60.0030.00516.81
8.0.50.0000.00916.79
8.0.30.0050.01217.11
8.0.20.0120.00617.40
8.0.10.0050.00217.09
8.0.00.0140.00916.75
7.4.330.0040.00015.55
7.4.320.0070.00016.57
7.4.300.0030.00316.44
7.4.290.0000.00716.54
7.4.280.0050.00316.51
7.4.270.0030.00316.70
7.4.260.0030.00316.66
7.4.250.0070.00016.55
7.4.240.0000.00716.51
7.4.230.0000.00716.57
7.4.220.0030.00616.46
7.4.210.0090.00916.51
7.4.200.0040.00416.77
7.4.160.0080.00916.60
7.4.150.0200.01017.40
7.4.140.0100.00717.86
7.4.130.0130.01016.71
7.4.120.0100.00916.63
7.4.110.0100.00716.60
7.4.100.0080.00816.43
7.4.90.0150.00516.77
7.4.80.0070.01119.39
7.4.70.0120.00616.70
7.4.60.0160.00016.56
7.4.50.0040.01216.25
7.4.40.0030.01716.70
7.4.00.0040.01215.11
7.3.330.0030.00313.38
7.3.320.0060.00013.27
7.3.310.0070.00016.27
7.3.300.0040.00416.23
7.3.290.0030.00316.37
7.3.280.0120.01016.36
7.3.270.0180.00017.40
7.3.260.0110.00916.60
7.3.250.0090.00816.60
7.3.240.0120.00616.56
7.3.230.0100.01016.60
7.3.210.0040.01416.67
7.3.200.0120.00416.50
7.3.190.0060.00916.57
7.3.180.0040.01316.64
7.3.170.0060.00916.47
7.3.160.0120.00616.86
7.2.330.0130.00316.82
7.2.320.0030.01816.61
7.2.310.0030.01216.84
7.2.300.0130.01016.41
7.2.290.0030.01216.59
7.2.60.0130.00316.79
7.2.20.0500.01117.67
7.2.10.0420.01217.75
7.2.00.0410.01217.63
7.1.200.0030.01015.54
7.1.140.0390.00916.74
7.1.130.0490.01216.62
7.1.120.0360.01116.72
7.1.110.0340.00516.05
7.1.100.0390.01116.14
7.1.90.0600.01016.09
7.1.80.0410.01316.07
7.1.70.0490.01215.33
7.1.60.0720.01133.17
7.1.50.0480.01133.14
7.1.40.0430.01832.64
7.1.30.0650.01132.96
7.1.20.0500.01632.81
7.1.10.0380.00815.04
7.1.00.0450.00814.83

preferences:
43.41 ms | 400 KiB | 5 Q