3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new DateTime('2015-1-31'); $b = new DateTime('2015-1-31 14:45'); $a->add(new DateInterval('P6Y')); echo $a->format('Y-m-d'); echo date('Y-m-d', strtotime('+1 month', strtotime('2015-1-31'))); echo $a < $b ? 'ja' : 'nein';

preferences:
48.76 ms | 402 KiB | 5 Q