3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $minutes = 5; $dt = new DateTime('2001-01-01 01:01:60'); echo $dt->minute(floor($dt->minute/$minutes) * $minutes)->format('Y-m-d H:i:s') . "\n"; echo $dt->minute(ceil($dt->minute/$minutes) * $minutes)->format('Y-m-d H:i:s') . "\n";
based on UZEoL
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined method DateTime::minute() in /in/7f03b:7 Stack trace: #0 {main} thrown in /in/7f03b on line 7
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Fatal error: Call to undefined method DateTime::minute() in /in/7f03b on line 7
Process exited with code 255.