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( 'fourth thursday 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( 'third 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.4.00.0070.00915.00
7.3.120.0030.01314.98
7.3.110.0100.00715.15
7.3.100.0090.01015.07
7.3.90.0020.01114.91
7.3.80.0080.00915.07
7.3.70.0030.00715.08
7.3.60.0120.00415.00
7.3.50.0050.00914.99
7.3.40.0110.00314.74
7.3.30.0090.00514.96
7.3.20.0080.00516.62
7.3.10.0090.00516.76
7.3.00.0100.00216.64
7.2.250.0060.01115.02
7.2.240.0050.01115.14
7.2.230.0020.01415.30
7.2.220.0030.01315.31
7.2.210.0030.01315.38
7.2.200.0070.00715.04
7.2.190.0050.00815.12
7.2.180.0090.00715.38
7.2.170.0050.01215.03
7.2.160.0070.01115.18
7.2.150.0080.00917.15
7.2.140.0030.01216.94
7.2.130.0050.00817.02
7.2.120.0080.00316.93
7.2.110.0060.00917.03
7.2.100.0010.00917.05
7.2.90.0060.00717.08
7.2.80.0080.00917.00
7.2.70.0120.00417.04
7.2.60.0070.01017.13
7.2.50.0030.01417.03
7.2.40.0060.01017.04
7.2.30.0130.00517.06
7.2.20.0170.01017.47
7.2.10.0190.01117.43
7.2.00.0130.01017.44
7.1.330.0030.01216.02
7.1.320.0070.00716.03
7.1.310.0030.00915.88
7.1.300.0020.01115.79
7.1.290.0040.00915.92
7.1.280.0040.01215.95
7.1.270.0090.00415.98
7.1.260.0050.01116.09
7.1.250.0050.00715.90
7.1.240.0100.00515.80
7.1.230.0070.00615.94
7.1.220.0020.01115.87
7.1.210.0050.00915.84
7.1.200.0070.00815.92
7.1.190.0110.00516.05
7.1.180.0060.00715.93
7.1.170.0070.01115.85
7.1.160.0080.00715.93
7.1.150.0080.00815.98
7.1.140.0190.00416.15
7.1.130.0200.00816.15
7.1.120.0200.00316.05
7.1.110.0140.00815.79
7.1.100.0170.00715.98
7.1.90.0180.00915.89
7.1.80.0070.00716.00
7.1.70.0090.00815.88
7.1.60.0170.01421.85
7.1.50.0240.00721.69
7.1.40.0300.00821.56
7.1.30.0270.00921.53
7.1.20.0260.01021.60
7.1.10.0210.00915.65
7.1.00.0230.00615.67
7.0.330.0030.01015.58
7.0.320.0080.00315.51
7.0.310.0070.00815.45
7.0.300.0060.00915.65
7.0.290.0040.01015.51
7.0.280.0060.00815.47
7.0.270.0050.00915.46
7.0.260.0040.01215.56
7.0.250.0070.00815.76
7.0.240.0050.01015.42
7.0.230.0040.00915.46
7.0.220.0090.00515.41
7.0.210.0060.00715.40
7.0.200.0100.00315.64
7.0.190.0090.00515.46
7.0.180.0070.00615.56
7.0.170.0030.00915.54
7.0.160.0050.00815.37
7.0.150.0120.00315.36
7.0.140.0110.00315.41
7.0.130.0040.00615.61
7.0.120.0020.01315.64
7.0.110.0040.01115.63
7.0.100.0060.00715.63
7.0.90.0050.00615.45
7.0.80.0040.01115.48
7.0.70.0110.00215.64
7.0.60.0050.00515.66
7.0.50.0080.00315.45
7.0.40.0070.00713.71
7.0.30.0120.00313.70
7.0.20.0000.01213.63
7.0.10.0060.00913.64
7.0.00.0030.01213.64
5.6.400.0050.00514.68
5.6.390.0070.00714.47
5.6.380.0080.00514.54
5.6.370.0080.00614.59
5.6.360.0060.01014.57
5.6.350.0060.00914.67
5.6.340.0080.00514.38
5.6.330.0040.00714.62
5.6.320.0060.00814.59
5.6.310.0020.01314.51
5.6.300.0060.00914.53
5.6.290.0050.00814.53
5.6.280.0020.00814.54
5.6.270.0090.00614.35
5.6.260.0060.00914.49
5.6.250.0050.01014.47
5.6.240.0050.00914.78
5.6.230.0070.00714.53
5.6.220.0100.00414.43
5.6.210.0050.00814.48
5.6.200.0080.00614.34
5.6.190.0040.00914.47
5.6.180.0040.00914.57
5.6.170.0060.00814.52
5.6.160.0100.00314.51
5.6.150.0030.01214.47
5.6.140.0090.00214.44
5.6.130.0020.01314.56
5.6.120.0070.00714.57
5.6.110.0020.01014.49
5.6.100.0030.01014.30
5.6.90.0090.00314.36
5.6.80.0110.00414.24
5.6.70.0050.00814.14
5.6.60.0090.00314.50
5.6.50.0050.00714.35
5.6.40.0090.00514.60
5.6.30.0010.01214.66
5.6.20.0060.00714.28
5.6.10.0050.00814.15
5.6.00.0040.00914.43

preferences:
41.65 ms | 401 KiB | 5 Q