3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $quarter = round(date('i', $yourdate) / 15) * 15; // get the new timestamp $roundeddate = mktime(date("H",$yourdate), $quarter, date("s",$yourdate), date("n",$yourdate), date("j",$yourdate), date("Y",$yourdate)); echo $roundeddate;
Output for 5.0.4 - 7.1.10
Notice: Undefined variable: yourdate in /in/rne8G on line 2 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 0
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: yourdate in /in/rne8G on line 2 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 0