3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xx = new DateTime('2000-01-01', new DateTimeZone('America/New_York')); $x = $xx->format('W'); $now = new DateTime('Sunday of week ' . $x); $y = $now->format('D'); echo $y;
based on pn7v7
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Exception: DateTime::__construct(): Failed to parse time string (Sunday of week 52) at position 7 (o): The timezone could not be found in the database in /in/L0Ptm:5 Stack trace: #0 /in/L0Ptm(5): DateTime->__construct('Sunday of week ...') #1 {main} thrown in /in/L0Ptm on line 5
Process exited with code 255.
Output for 5.3.19 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (Sunday of week 52) at position 7 (o): The timezone could not be found in the database' in /in/L0Ptm:5 Stack trace: #0 /in/L0Ptm(5): DateTime->__construct('Sunday of week ...') #1 {main} thrown in /in/L0Ptm on line 5
Process exited with code 255.