Bug #70266 [Ana->Csd]: DateInterval::__construct.interval_spec is not supposed to be optional

From: Date: Fri, 14 Aug 2015 12:34:14 +0000
Subject: Bug #70266 [Ana->Csd]: DateInterval::__construct.interval_spec is not supposed to be optional
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195206@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70266&edit=1 ID: 70266 Updated by: cmb@php.net Reported by: ocramius at gmail dot com Summary: DateInterval::__construct.interval_spec is not supposed to be optional -Status: Analyzed +Status: Closed Type: Bug Package: Date/time related PHP Version: 7.0.0beta3 Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmb Revision: http://git.php.net/?p=php-src.git;a=commit;h=e66bf11638409b9582d5b9159b97e8b108c29796 Log: Fix #70266 (DateInterval::__construct.interval_spec is not supposed to be optional) Previous Comments: ------------------------------------------------------------------------ [2015-08-14 12:11:35] cmb@php.net Indeed, the required_num_args argument of ZEND_BEGIN_ARG_INFO_EX() is wrong: <https://github.com/php/php-src/blob/php-5.6.12/ext/date/php_date.c#L386>. ------------------------------------------------------------------------ [2015-08-14 07:47:50] ocramius at gmail dot com Description: ------------ As per http://3v4l.org/HBIB5, DateInterval::__construct.interval_spec is defined as optional in PHP7 Test script: --------------- if ((new ReflectionParameter(['DateInterval', '__construct'], 0))->isOptional()) { echo 'optional'; } else { echo 'non optional'; } Expected result: ---------------- non optional Actual result: -------------- optional ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70266&edit=1

« previous php.bugs (#195206) next »