3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $one_year_ago = date('Y-m-d 0:00', strtotime("-1 year", time())); $retry_after_date = new DateTime($one_year_ago); echo 'start::'.$retry_after_date->format('Y-m-d H:i'); for ($i=5; $i < 50; $i+=5) { // $retry_after_date = DateAdd("n", 5, RetryAfterDate) $retry_after_date->add(new DateInterval('PT' . 5. 'M')); echo "\n$i::".$retry_after_date->format('Y-m-d H:i'); }
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected ''M'' (T_CONSTANT_ENCAPSED_STRING) in /in/lHnjI on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /in/lHnjI on line 8
Process exited with code 255.