3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time_str = '1:47 PM'; $tz_str = 'America/New_York'; $timestamp = time(); $datetime = new DateTime("now", new DateTimeZone($tz_str)); //first argument "must" be a string $datetime->setTimestamp($timestamp); //adjust the object to correct timestamp //$datetime = new DateTime( '2010-05' ); $datetime->modify( 'first day of +0 month' ); echo $datetime->format( 'F' ), "\n"; echo $datetime->format('w d.m.Y, H:i:s') . "\n"; echo $datetime->format('m.Y') . "\n"; $datetime->modify( 'last day of +0 month' ); echo $datetime->format( 'F' ), "\n"; echo $datetime->format('w d.m.Y, H:i:s') . "\n"; echo $datetime->format('m.Y') . "\n"; $datetime->modify( 'first day of +1 month' ); echo $datetime->format( 'F' ), "\n"; echo $datetime->format('w d.m.Y, H:i:s') . "\n"; echo $datetime->format('m.Y') . "\n";

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)
7.3.10.0070.00616.81
7.3.00.0060.01016.62
7.2.130.0000.01417.22
7.2.120.0090.00917.05
7.2.110.0060.00917.12
7.2.100.0110.00516.96
7.2.90.0100.00517.24
7.2.80.0090.00817.06
7.2.70.0070.00717.08
7.2.60.0070.00717.20
7.2.50.0080.00617.10
7.2.40.0070.00617.02
7.2.30.0080.00817.12
7.2.20.0160.01117.49
7.2.10.0140.01017.20
7.2.00.0120.01017.40
7.1.250.0030.00615.93
7.1.240.0090.00615.94
7.1.230.0030.00916.04
7.1.220.0070.00715.89
7.1.210.0110.00315.93
7.1.200.0060.00615.68
7.1.190.0120.00316.08
7.1.180.0040.00415.98
7.1.170.0040.00815.89
7.1.160.0030.00715.85
7.1.150.0040.00815.81
7.1.140.0130.01016.51
7.1.130.0110.01116.40
7.1.120.0130.01216.42
7.1.110.0150.01216.03
7.1.100.0150.00716.00
7.1.90.0380.00516.20
7.1.80.0150.01216.10
7.1.70.0120.01115.71
7.1.60.0240.01324.63
7.1.50.0200.01024.67
7.1.40.0190.01424.13
7.1.30.0290.01524.23
7.1.20.0280.01224.31
7.1.10.0190.01215.41
7.1.00.0160.01115.49
7.0.330.0100.00315.35
5.6.380.0100.00314.44

preferences:
34.93 ms | 400 KiB | 5 Q