<?php
//1
$my_datestr = '01.11.2014';
$my_date = strtotime ($my_datestr);
$tmp = ($my_date - time ());
$years_left = explode ('.', $tmp / 31536000);
$month_left = explode ('.', $tmp / 2592000);
$month = $month_left[0] - ($years_left[0] * 12);
$left_days = explode ('.', $tmp / 86400);
$days = $left_days[0] - ($month_left[0] * 30);
$left_hours = explode ('.', $tmp / 3600)
$hours = $left_hours[0] - ($left_days[0] * 24);
$left_minutes = explode ('.', $tmp / 60);
$minutes = $left_minutes[0] - ($left_hours[0] * 60);
$left_seconds = $tmp;
$left_seconds = $left_seconds - ($left_hours[0] * 3600) - ($minutes * 60);
echo 'ƒо ' . $my_datestr . ' осталось ' . $years_left[0] . ' лет ' . $month . ' мес¤цев ' . $days . ' дней, ' . $hours . ' часов, ' . $minutes . ' минут, ' . $left_seconds . ' секунд.';
//4
?>
- Output for 5.4.0 - 5.4.34
- Parse error: syntax error, unexpected '$hours' (T_VARIABLE) in /in/f93fp on line 12
Process exited with code 255. - Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
- Parse error: syntax error, unexpected T_VARIABLE in /in/f93fp on line 12
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
- Parse error: parse error, unexpected T_VARIABLE in /in/f93fp on line 12
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error in /in/f93fp on line 12
Process exited with code 255.
preferences:
227.28 ms | 1395 KiB | 124 Q