3v4l.org

run code in 300+ PHP versions simultaneously
<?php // http://stackoverflow.com/questions/13128854/php-datetime-class-change-first-day-of-the-week-to-monday?rq=1 test = new DateTime('2012-11-04'); // 2012-11-05 // I expect to get 2012-10-29 echo $test->modify('Monday this week')->format('Y-m-d');

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.0.10.0070.04320.15
7.0.00.0070.05320.18
5.6.160.0070.08020.44
5.6.150.0030.04718.30
5.6.140.0070.06318.15
5.6.130.0030.09018.15
5.6.120.0000.04720.99
5.6.110.0030.05721.13
5.6.100.0000.08721.01
5.6.90.0070.05721.13
5.6.80.0030.04020.43
5.5.300.0100.07717.93
5.5.290.0000.04318.09
5.5.280.0030.05020.80
5.5.270.0100.03720.89
5.5.260.0130.07020.86
5.5.250.0000.08020.68
5.5.240.0070.04020.28

preferences:
137.96 ms | 1394 KiB | 7 Q