/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/date/tests/DateTime_extends_basic3.phpt
24 строки
559 B
Máté Kocsis
Add support for tentative return types of internal methods
14 май 2021, 16:55
Не верифицирован
14 май 2021, 16:55
532c60c
Код
Авторство
О чём код?
--TEST-- Test DateTime class inheritance : with user space format() method --FILE-- <?php //Set the default time zone date_default_timezone_set("Europe/London"); echo "*** Testing new DateTime() : with user format() method ***\n"; class DateTimeExt extends DateTime { public function format($format = "F j, Y, g:i:s a"): string { return parent::format($format); } } $d = new DateTimeExt("1967-05-01 22:30:41"); echo $d->format() . "\n"; ?> --EXPECT-- *** Testing new DateTime() : with user format() method *** May 1, 1967, 10:30:41 pm