ZEND_PARSE_PARAMETERS_NONE();
dpobj = Z_PHPPERIOD_P(ZEND_THIS);
+ DATE_CHECK_INITIALIZED(dpobj->start, DatePeriod);
php_date_instantiate(dpobj->start_ce, return_value);
dateobj = Z_PHPDATE_P(return_value);
ZEND_PARSE_PARAMETERS_NONE();
dpobj = Z_PHPPERIOD_P(ZEND_THIS);
+ DATE_CHECK_INITIALIZED(dpobj->interval, DatePeriod);
php_date_instantiate(date_ce_interval, return_value);
diobj = Z_PHPINTERVAL_P(return_value);
function __construct() {
}
}
+class _p extends DatePeriod {
+ function __construct() {
+ }
+}
$d = new DateTime;
var_dump($d->format("Y-m-d H:i:s"));
echo $e->getMessage(),"\n";
}
+$p = new _p;
+try {
+ var_dump($p->getStartDate());
+} catch (Error $e) {
+ echo $e->getMessage(),"\n";
+}
+try {
+ var_dump($p->getDateInterval());
+} catch (Error $e) {
+ echo $e->getMessage(),"\n";
+}
+
echo "DONE\n";
?>
--EXPECTF--
string(3) "UTC"
The DateTimeZone object has not been correctly initialized by its constructor
DateTimeZone::__construct(): Unknown or bad timezone (GottaFindThisOne)
+The DatePeriod object has not been correctly initialized by its constructor
+The DatePeriod object has not been correctly initialized by its constructor
DONE