3v4l.org

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