Bug #78993 [NEW]: Ellipsis inconsistency

From: Date: Thu, 19 Dec 2019 07:35:53 +0000
Subject: Bug #78993 [NEW]: Ellipsis inconsistency
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224399@lists.php.net to get a copy of this message
From: imbolk at gmail dot com Operating system: All PHP version: 7.4.1 Package: *General Issues Bug Type: Bug Bug description:Ellipsis inconsistency Description: ------------ It seems to me that there is an inconsistency in the PHP syntax associated with T_ELLIPSIS. Test script: --------------- $a = [[1,2,3], [4,5,6]]; var_dump(...($a)); var_dump(...(...($a))); Expected result: ---------------- array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } array(3) { [0]=> int(4) [1]=> int(5) [2]=> int(6) } array(6) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> int(4) [4]=> int(5) [5]=> int(6) } Actual result: -------------- array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } array(3) { [0]=> int(4) [1]=> int(5) [2]=> int(6) } PHP Parse error: syntax error, unexpected '...' (T_ELLIPSIS) in Command line code on line… -- Edit bug report at https://bugs.php.net/bug.php?id=78993&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78993&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78993&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78993&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78993&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78993&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78993&r=support Expected behavior: https://bugs.php.net/fix.php?id=78993&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78993&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78993&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78993&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78993&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78993&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78993&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78993&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78993&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78993&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78993&r=mysqlcfg

« previous php.bugs (#224399) next »