3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateofbirth = '31/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('Y-m-d'); }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
vld0.0080.04217.35
4.3.00.0000.03711.34
rfc.partials0.0100.00616.87

preferences:
111.39 ms | 454 KiB | 5 Q