3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateofbirth = '30/11/80'; $date = DateTime::createFromFormat('d/m/Y', $dateofbirth); $date_errors = DateTime::getLastErrors(); 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('YYYY-m-d'); }
Output for git.master, git.master_jit
Warning: Trying to access array offset on value of type bool in /in/kB0B5 on line 6 Warning: Trying to access array offset on value of type bool in /in/kB0B5 on line 6 0080008000800080-11-30
Output for rfc.property-hooks
Warning: Trying to access array offset on false in /in/kB0B5 on line 6 Warning: Trying to access array offset on false in /in/kB0B5 on line 6 0080008000800080-11-30

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