3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.10.0, 7.0.0 - 7.1.0
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 hhvm-3.12.0
Notice: Undefined variable: yourdate in /in/rne8G on line 2 Warning: date() expects parameter 2 to be integer, null given in /in/rne8G on line 2 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Warning: date() expects parameter 2 to be integer, null given in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Warning: date() expects parameter 2 to be integer, null given in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Warning: date() expects parameter 2 to be integer, null given in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Warning: date() expects parameter 2 to be integer, null given in /in/rne8G on line 4 Notice: Undefined variable: yourdate in /in/rne8G on line 4 Warning: date() expects parameter 2 to be integer, null given in /in/rne8G on line 4 943916400
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