3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inizio = new DateTime('2022-03-21 23:00.000001 Europe/Rome'); $fine = new DateTime('2022-03-22 05:05.000002 Europe/Rome'); $differenza = date_diff($fine,$inizio); $output = $differenza->i; var_dump($output); $string = $output . ''; if(strlen($output . '') == 1) $string = '0' . $output; var_dump($string, 'Stampa su schermo il mio oggetto DateInterval contenuto in $differenza: ', $differenza, $differenza->format('%R%a days')); //Formato con riempimento 0 var_dump($differenza->format('%I'));

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.130.0100.00016.89
8.3.120.0090.00020.79
8.3.110.0070.01318.47
8.3.100.0070.00416.64
8.3.90.0040.00426.77
8.3.80.0030.00616.38
8.3.70.0170.00316.63
8.3.60.0090.00616.50
8.3.50.0090.00620.12
8.3.40.0040.01119.04
8.3.30.0090.00619.34
8.3.20.0030.00624.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.250.0050.00319.07
8.2.240.0090.00917.26
8.2.230.0030.00620.94
8.2.220.0060.00324.06
8.2.210.0000.00826.77
8.2.200.0060.00316.88
8.2.190.0000.01416.75
8.2.180.0040.01125.92
8.2.170.0130.01019.14
8.2.160.0110.00422.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0040.00426.16
8.2.110.0060.00322.26
8.2.100.0050.00517.84
8.2.90.0040.00417.97
8.2.80.0080.00017.97
8.2.70.0000.00817.93
8.2.60.0040.00418.16
8.2.50.0080.00017.98
8.2.40.0000.00818.34
8.2.30.0040.00418.35
8.2.20.0020.00520.41
8.2.10.0030.00618.07
8.2.00.0040.00419.34
8.1.300.0000.00918.07
8.1.290.0090.00030.84
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00824.02
8.1.230.0170.00020.65
8.1.220.0000.00720.94
8.1.210.0080.00018.77
8.1.200.0070.00717.35
8.1.190.0030.00617.35
8.1.180.0000.00818.10
8.1.170.0000.00817.62
8.1.160.0000.00718.90
8.1.150.0030.00618.90
8.1.140.0040.00417.77
8.1.130.0000.00819.04
8.1.120.0000.00717.63
8.1.110.0040.00417.66
8.1.100.0030.00517.73
8.1.90.0040.00417.65
8.1.80.0040.00417.72
8.1.70.0000.00717.65
8.1.60.0030.00617.70
8.1.50.0030.00517.69
8.1.40.0200.00717.49
8.1.30.0140.01117.55
8.1.20.0100.01317.68
8.1.10.0220.00417.64
8.1.00.0190.00517.56
8.0.300.0070.00019.73
8.0.290.0100.00016.88
8.0.280.0080.00018.55
8.0.270.0040.00417.04
8.0.260.0040.00418.56
8.0.250.0000.00817.17
8.0.240.0000.00817.10
8.0.230.0030.00317.14
8.0.220.0040.00416.98
8.0.210.0000.00917.10
8.0.200.0040.00417.04
8.0.190.0050.00317.04
8.0.180.0070.00017.05
8.0.170.0200.00316.94
8.0.160.0140.00916.98
8.0.150.0130.00616.84
8.0.140.0150.00516.98
8.0.130.0150.00517.02
8.0.120.0140.00717.01
8.0.110.0120.00617.04
8.0.100.0150.00517.00
8.0.90.0110.01117.02
8.0.80.0170.00917.05
8.0.70.0120.00716.93
8.0.60.0110.00817.04
8.0.50.0210.00017.02
8.0.30.0140.00517.00
8.0.20.0130.00717.06
8.0.10.0170.00417.20
7.4.330.0030.00315.55
7.4.320.0030.00316.63
7.4.300.0030.00316.80
7.4.290.0030.00816.54
7.4.280.0190.00516.67
7.4.270.0190.00416.51
7.4.260.0200.00416.72
7.4.250.0140.01016.60
7.4.240.0140.00716.60
7.4.230.0200.00316.61
7.4.220.0210.00016.46
7.4.210.0200.00016.52
7.4.200.0190.00016.57
7.4.190.0190.00016.65
7.4.180.0160.00316.64
7.4.160.0180.00016.78
7.4.150.0090.00616.63
7.4.140.0030.00716.69
7.4.130.0070.00416.48
7.4.120.0100.00316.53
7.4.110.0100.00216.38
7.4.100.0000.00716.71
7.4.90.0040.00416.54
7.4.80.0040.00416.56
7.4.70.0000.00916.63
7.4.60.0030.00316.40
7.4.50.0000.00716.44
7.4.40.0030.00316.33
7.4.30.0050.00516.54
7.4.20.0110.00416.56
7.4.10.0070.00716.56
7.4.00.0080.00516.60

preferences:
65.39 ms | 403 KiB | 5 Q