3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); function diff($age) { $morgen['day'] = date('d'); $morgen['month'] = date('m'); $morgen['year'] = date('Y') - $age; $datum = $morgen['year'] .'-' .$morgen['month'].'-' .$morgen['day']; return $datum; } $minDatum = strtotime(diff(18)); $maxDatum = strtotime(diff(32)); $dob = strtotime("23 10 1989"); echo $dob."\n".$minDatum."\n".$maxDatum."\n"; if (!$dob){ //$date_of_birth = date('Y-m-d H:i:s', $minDatum); } elseif ($dob <= $maxDatum || $dob >= $minDatum){ $date_of_birth = date('Y-m-d H:i:s', $minDatum); }else{ $date_of_birth = date('Y-m-d H:i:s', $dob); } echo $date_of_birth; ?>
Output for git.master, git.master_jit, rfc.property-hooks
822096000 380332800 Warning: Undefined variable $date_of_birth in /in/B8r41 on line 28

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