3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = ['1.2', '1.0', '2.11']; foreach ($tests as $yearWithDecimal) { $years = floor($yearWithDecimal); $months = ($yearWithDecimal - $years) * 12; $totalMonths = ($years * 12) + $months; echo $totalMonths.PHP_EOL; // Output is 14.4 }

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.00.0140.00619.78
8.4.150.0010.00114.05
8.4.140.0110.00917.27
8.4.130.0130.00817.93
8.4.120.0050.00424.27
8.4.110.0080.00318.77
8.4.100.0150.00617.69
8.4.90.0120.01017.89
8.4.80.0080.00317.89
8.4.70.0150.00618.05
8.4.60.0060.00418.55
8.4.50.0040.00518.84
8.4.40.0160.00318.20
8.4.30.0100.01022.38
8.4.20.0050.00517.71
8.4.10.0040.00419.02
8.3.280.0020.00114.05
8.3.270.0110.00816.50
8.3.260.0130.00716.47
8.3.250.0090.00219.14
8.3.240.0110.00816.41
8.3.230.0130.00716.50
8.3.220.0110.00716.62
8.3.210.0100.00718.47
8.3.200.0040.00416.46
8.3.190.0150.00317.34
8.3.180.0110.00816.25
8.3.170.0120.00620.75
8.3.160.0030.01417.19
8.3.150.0030.01217.19
8.3.140.0140.00416.54
8.3.130.0030.00516.58
8.3.120.0090.00018.75
8.3.110.0080.00016.53
8.3.100.0050.00324.06
8.3.90.0000.00826.77
8.3.80.0030.00717.97
8.3.70.0110.00416.38
8.3.60.0110.00716.63
8.3.50.0100.00716.55
8.3.40.0110.00422.35
8.3.30.0070.00721.85
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0090.00918.60
8.2.280.0110.00920.19
8.2.270.0110.00717.11
8.2.260.0030.00516.69
8.2.250.0080.00018.17
8.2.240.0110.00717.19
8.2.230.0030.00520.94
8.2.220.0070.00037.54
8.2.210.0000.00826.77
8.2.200.0000.00916.63
8.2.190.0130.00616.58
8.2.180.0060.01016.38
8.2.170.0120.00319.09
8.2.160.0120.00622.96
8.2.150.0000.00725.66
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00421.08
8.2.110.0130.00722.37
8.2.100.0140.00720.80
8.2.90.0210.01018.88
8.2.80.0220.00318.61
8.2.70.0160.00320.61
8.2.60.0230.00718.93
8.2.50.0120.00418.91
8.2.40.0270.00318.86
8.2.30.0120.00018.95
8.2.20.0110.00318.90
8.2.10.0140.00019.20
8.2.00.0080.00818.93
8.1.330.0110.00816.20
8.1.320.0070.01215.83
8.1.310.0060.01216.58
8.1.300.0120.00416.45
8.1.290.0090.00330.84
8.1.280.0090.00925.92
8.1.270.0070.00024.09
8.1.260.0000.00926.35
8.1.250.0070.00028.09
8.1.240.0170.00718.48
8.1.230.0200.01018.64
8.1.220.0210.00318.76
8.1.210.0170.00719.83
8.1.200.0180.01418.38
8.1.190.0260.00618.38
8.1.180.0170.01018.38
8.1.170.0060.01220.23
8.1.160.0160.00518.86
8.1.150.0100.00620.43
8.1.140.0110.00418.52
8.1.130.0110.00518.38
8.1.120.0110.00318.58
8.1.110.0140.00018.69
8.1.100.0110.00418.50
8.1.90.0040.00918.66
8.1.80.0130.00018.52
8.1.70.0050.00518.67
8.1.60.0120.00418.63
8.1.50.0120.00418.73
8.1.40.0000.01219.05
8.1.30.0040.00818.98
8.1.20.0090.00618.61
8.1.10.0100.00218.91
8.1.00.0100.00318.58
8.0.300.0110.00417.99
8.0.290.0120.00317.95
8.0.280.0100.00317.87
8.0.270.0080.00618.00
8.0.260.0070.00717.92
8.0.250.0090.00618.07
8.0.240.0070.00718.07
8.0.230.0060.00618.38
8.0.220.0090.00617.91
8.0.210.0080.00617.93
8.0.200.0120.00317.96
8.0.190.0120.00318.08
8.0.180.0140.00018.00
8.0.170.0040.00717.99
8.0.160.0160.00017.80
8.0.150.0040.01217.99
8.0.140.0070.00717.81
8.0.130.0060.00618.30
8.0.120.0070.00717.87
8.0.110.0050.00918.08
8.0.100.0090.00617.83
8.0.90.0120.00417.94
8.0.80.0160.00017.93
8.0.70.0160.00017.91
8.0.60.0140.00017.95
8.0.50.0110.00417.92
8.0.30.0110.00417.93
8.0.20.0070.00718.14
8.0.10.0080.00818.04

preferences:
30.67 ms | 403 KiB | 5 Q