Bug #68422 [Opn->Csd]: Incorrect argument reflection info for array_multisort()

From: Date: Mon, 24 Nov 2014 00:42:56 +0000
Subject: Bug #68422 [Opn->Csd]: Incorrect argument reflection info for array_multisort()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188768@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68422&edit=1

 ID:                 68422
 Updated by:         stas@php.net
 Reported by:        lisachenko dot it at gmail dot com
 Summary:            Incorrect argument reflection info for
                     array_multisort()
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Reflection related
 PHP Version:        master-Git-2014-11-14 (Git)
-Assigned To:        
+Assigned To:        stas
 Block user comment: N
 Private report:     N

 New Comment:

The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

fixed by https://github.com/php/php-src/pull/900


Previous Comments:
------------------------------------------------------------------------
[2014-11-14 12:42:55] lisachenko dot it at gmail dot com

PR on GitHub: https://github.com/php/php-src/pull/900

------------------------------------------------------------------------
[2014-11-14 12:39:04] lisachenko dot it at gmail dot com

Description:
------------
PHP7 requires that argument names should be unique. array_multisort ARG_INFO is invalid, because it
contains duplicate names for arguments.

Also, http://php.net/manual/en/function.array-multisort.php
declares the signature as the following:

bool array_multisort ( array &$array1 [, mixed $array1_sort_order = SORT_ASC [, mixed
$array1_sort_flags = SORT_REGULAR [, mixed $... ]]] )

Test script:
---------------
php --rf array_multisort

Expected result:
----------------
Function [ <internal:standard> function array_multisort ] {

  - Parameters [7] {
    Parameter #0 [ <required> &$arr1 ]
    Parameter #1 [ <optional> &$sort_order ]
    Parameter #2 [ <optional> &$sort_flags ]
    Parameter #3 [ <optional> &...$arr2 ]
  }
}

Actual result:
--------------
Function [ <internal:standard> function array_multisort ] {

  - Parameters [7] {
    Parameter #0 [ <required> &$arr1 ]
    Parameter #1 [ <optional> &$SORT_ASC_or_SORT_DESC ]
    Parameter #2 [ <optional> &$SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING ]
    Parameter #3 [ <optional> &$arr2 ]
    Parameter #4 [ <optional> &$SORT_ASC_or_SORT_DESC ]
    Parameter #5 [ <optional> &$SORT_REGULAR_or_SORT_NUMERIC_or_SORT_STRING ]
    Parameter #6 [ <optional> &...$more_array_and_sort_options ]
  }
}


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=68422&edit=1


Thread (3 messages)

« previous php.bugs (#188768) next »