3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_valid_date($date) { if (preg_match('/^((19|20)\\d\\d)-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01]) ([01]\d|2[0123]):([0-5]\d):([0-5]\d)$/', $date, $matches)){ return checkdate($matches[3], $matches[4], $matches[1]); } return false; } var_dump(is_valid_date("2012-12-02 15:30:00")); //true ?>
Output for git.master, git.master_jit, rfc.property-hooks
bool(true)

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
41.17 ms | 401 KiB | 8 Q