3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Emp { public $name = ""; public $hobbies = ""; public $birthdate = ""; } $e = new Emp(); $e->name = "sachin"; $e->hobbies = "sports"; $e->birthdate = date('m/d/Y h:i:s a', "8/5/1974 12:20:03 p"); $e->birthdate = date('m/d/Y h:i:s a', strtotime("8/5/1974 12:20:03")); echo json_encode($e); ?>
based on Ucemj
Output for 5.6.0 - 5.6.30, hhvm-3.12.14 - 3.17.3, 7.0.0 - 7.3.0beta1
Notice: A non well formed numeric value encountered in /in/7tI8M on line 12 {"name":"sachin","hobbies":"sports","birthdate":"08\/05\/1974 12:20:03 pm"}