3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateofbirth = '18/11/80'; $date = DateTime::createFromFormat('d/m/Y', $dateofbirth); $date_errors = DateTime::getLastErrors(); var_dump($date_errors); if ($date_errors['warning_count'] + $date_errors['error_count'] > 0) { echo 'Date '.$dateofbirth.' is not a valid DD/MM/YYYY format.'; } else { echo $date->format('Y-m-d'); }
Output for git.master, git.master_jit
bool(false) Warning: Trying to access array offset on value of type bool in /in/KOXIp on line 7 Warning: Trying to access array offset on value of type bool in /in/KOXIp on line 7 0080-11-18
Output for rfc.property-hooks
bool(false) Warning: Trying to access array offset on false in /in/KOXIp on line 7 Warning: Trying to access array offset on false in /in/KOXIp on line 7 0080-11-18

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