3v4l.org

run code in 300+ PHP versions simultaneously
<?php $zeit = time(); $datum = getdate($zeit); $mm = sprintf("%02d", $datum[mon]); $tt = sprintf("%02d", $datum[mday]); $hh = sprintf("%02d", $datum[hours]); $nn = sprintf("%02d", $datum[minutes]); $ss = sprintf("%02d", $datum[seconds]); $ts = $datum[year] . $mm . $tt . $hh . $nn . $ss; echo $ts;
Output for 7.2.0 - 7.2.6
Warning: Use of undefined constant mon - assumed 'mon' (this will throw an Error in a future version of PHP) in /in/g0Tfj on line 5 Warning: Use of undefined constant mday - assumed 'mday' (this will throw an Error in a future version of PHP) in /in/g0Tfj on line 6 Warning: Use of undefined constant hours - assumed 'hours' (this will throw an Error in a future version of PHP) in /in/g0Tfj on line 7 Warning: Use of undefined constant minutes - assumed 'minutes' (this will throw an Error in a future version of PHP) in /in/g0Tfj on line 8 Warning: Use of undefined constant seconds - assumed 'seconds' (this will throw an Error in a future version of PHP) in /in/g0Tfj on line 9 Warning: Use of undefined constant year - assumed 'year' (this will throw an Error in a future version of PHP) in /in/g0Tfj on line 11 20140422205343
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20
Notice: Use of undefined constant mon - assumed 'mon' in /in/g0Tfj on line 5 Notice: Use of undefined constant mday - assumed 'mday' in /in/g0Tfj on line 6 Notice: Use of undefined constant hours - assumed 'hours' in /in/g0Tfj on line 7 Notice: Use of undefined constant minutes - assumed 'minutes' in /in/g0Tfj on line 8 Notice: Use of undefined constant seconds - assumed 'seconds' in /in/g0Tfj on line 9 Notice: Use of undefined constant year - assumed 'year' in /in/g0Tfj on line 11 20140422205343

preferences:
188.74 ms | 405 KiB | 219 Q