3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkDateTime($dateTime){ $re1='((?:(?:[1]{1}\\d{1}\\d{1}\\d{1})|(?:[2]{1}\\d{3}))[-:\\/.](?:[0]?[1-9]|[1][012])[-:\\/.](?:(?:[0-2]?\\d{1})|(?:[3][01]{1})))(?![\\d])'; $re2='(T)'; $re3='((?:(?:[0-1][0-9])|(?:[2][0-3])|(?:[0-9])):(?:[0-5][0-9])(?::[0-5][0-9])?(?:\\s?(?:am|AM|pm|PM))?)'; if ($c=preg_match_all ("/".$re1.$re2.$re3."/is", $dateTime, $matches)){ return true; } else{ return false; } } $a = checkDateTime("2014-80-26T00:00:00"); var_dump($a);
Output for git.master, git.master_jit, rfc.property-hooks
bool(false)

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:
29.52 ms | 401 KiB | 8 Q