3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $created = '2017-12-31 23:59:00'; $splitBySpace = explode(' ', $created); if (isset($splitBySpace[0])) { $splitByLine = explode('-', $splitBySpace[0]); if (isset($splitByLine[0]) && isset($splitByLine[1]) && isset($splitByLine[2])) { if (checkdate($splitByLine[1], $splitByLine[2], $splitByLine[0])) { echo 'true'; } } } echo 'false'; //var_dump(checkdate('2018-04-04'));
based on oaGRU
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.1.0 - 7.3.0beta1
truefalse