3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = '13-09-2010 00:00:00'; date_default_timezone_set('IST'); $etc = (strtotime($date) * 1000) - (strtotime('02-01-1970 00:00:00') * 1000); echo $etc; echo "\n---------------------------------------------------------------------\n"; $str = strtotime($date); //Wed Oct 13 2010 05:30:00 GMT+0530 $ab = date("D M j Y G:i:s T", strtotime('02-01-1970 00:00:00')); echo $ab; echo "\n---------------------------------------------------------------------\n"; $datetime = new DateTime('Fri Jan 2 1970 0:00:00 UTC', new DateTimeZone('Asia/Calcutta')); $datetime->setTimezone(new DateTimeZone('Asia/Calcutta')); print $datetime->format('Y-m-d H:i:s (e)'); echo "\n---------------------------------------------------------------------\n"; $cur_time=date("Y-m-d H:i:s"); $curDate = '02-01-1970'; $input = array(1,7,3,5,9,2); $duration='+"echo array_rand($input, 1);"' minutes'; echo date('Y-m-d H:i:s', strtotime($duration, strtotime($curDate)));

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.2.00.0030.01719.84
7.1.120.0090.00918.48
7.1.110.0010.01817.86
7.1.100.0030.01717.65
7.1.90.0060.01717.86
7.1.80.0000.01518.06
7.1.70.0040.00817.00
7.1.60.0160.01035.05
7.1.50.0130.01634.40
7.1.40.0230.01734.30
7.1.30.0220.00934.42
7.1.20.0100.01634.46
7.1.10.0090.00616.13
7.1.00.0040.01116.45

preferences:
134.14 ms | 1410 KiB | 7 Q