3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = DateTime::createFromFormat("W", "34"); print_r(DateTime::getLastErrors()); echo $d->format("Y-m-d");
based on r8COJ
Output for 7.0.0 - 7.2.0
Array ( [warning_count] => 0 [warnings] => Array ( ) [error_count] => 2 [errors] => Array ( [0] => The format separator does not match [1] => Trailing data ) ) Fatal error: Uncaught Error: Call to a member function format() on boolean in /in/MKiqN:5 Stack trace: #0 {main} thrown in /in/MKiqN on line 5
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Array ( [warning_count] => 0 [warnings] => Array ( ) [error_count] => 2 [errors] => Array ( [0] => The format separator does not match [1] => Trailing data ) ) Fatal error: Call to a member function format() on boolean in /in/MKiqN on line 5
Process exited with code 255.
Output for 5.3.21 - 5.5.35
Array ( [warning_count] => 0 [warnings] => Array ( ) [error_count] => 2 [errors] => Array ( [0] => The format separator does not match [1] => Trailing data ) ) Fatal error: Call to a member function format() on a non-object in /in/MKiqN on line 5
Process exited with code 255.