3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $star = $row["en_date"]; $finish = $row["to_date"]; $s = strtotime($star); $f = strtotime($finish); $e = $f-$s; echo sec2date($e); function sec2date($secs) { $sec = $secs%60; $jam = intval($secs/3600); $menit = intval($secs/60)%60; $sec = ($sec < 10)?"0$sec":"$sec"; $jam = ($jam < 10)?"0$jam":"$jam"; $menit = ($menit < 10) ? "0$menit" : "$menit"; return "$jam:$menit:$sec"; }
Output for 5.1.0 - 7.1.0
Notice: Undefined variable: row in /in/JZn4j on line 3 Notice: Undefined variable: row in /in/JZn4j on line 4 00:00:00
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: row in /in/JZn4j on line 3 Notice: Undefined variable: row in /in/JZn4j on line 4 Warning: strtotime(): Called with an empty time parameter. in /in/JZn4j on line 5 Warning: strtotime(): Called with an empty time parameter. in /in/JZn4j on line 6 00:00:00
Output for 5.0.1 - 5.0.3
Notice: Undefined variable: row in /in/JZn4j on line 3 Notice: Undefined variable: row in /in/JZn4j on line 4 Warning: strtotime(): Called with an empty time parameter. in /in/JZn4j on line 5 Warning: strtotime(): Called with an empty time parameter. in /in/JZn4j on line 6 00:00:00
Output for 4.3.2 - 5.0.0
Notice: Undefined variable: row in /in/JZn4j on line 3 Notice: Undefined variable: row in /in/JZn4j on line 4 Notice: strtotime(): Called with empty time parameter in /in/JZn4j on line 5 Notice: strtotime(): Called with empty time parameter in /in/JZn4j on line 6 00:00:00
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: row in /in/JZn4j on line 3 Notice: Undefined variable: row in /in/JZn4j on line 4 Notice: strtotime() [http://www.php.net/function.strtotime]: Called with empty time parameter in /in/JZn4j on line 5 Notice: strtotime() [http://www.php.net/function.strtotime]: Called with empty time parameter in /in/JZn4j on line 6 00:00:00