3v4l.org

run code in 300+ PHP versions simultaneously
<?php $output = array(); $txt='2014-14-26T00:00:00'; $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))?)'; $regex = '(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})'; //if(!preg_match_all ("/".$re1.$re2.$re3."/is", $txt, $matches)){ if(preg_match($regex, $txt)){ $output["status"] = "error"; $output["reason"] = "not valid date"; print_r($output); } else{ $output["status"] = "ok"; $output["reason"] = "valid date"; print_r($output); }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: preg_match(): Unknown modifier '-' in /in/79InF on line 16 Array ( [status] => ok [reason] => valid date )

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