3v4l.org

run code in 300+ PHP versions simultaneously
<?php $invalid = '2019-03-32'; $invalid2 = '2019-03-30l'; $valid = '2019-03-30'; function is_date($date) { $splitefromdate = explode("-", $date); $fromyear = $splitefromdate[0]; $frommonth = $splitefromdate[1]; $fromdate = $splitefromdate[2]; return checkdate(is_numeric($frommonth), is_numeric($fromdate), is_numeric($fromyear)) && strtotime($date); } var_dump(is_date($invalid)); var_dump(is_date($invalid2)); var_dump(is_date($valid));
Output for git.master, git.master_jit, rfc.property-hooks
bool(false) bool(false) 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:
169.71 ms | 405 KiB | 5 Q