Incorrect argument reflection info for array_multisort()

Bug #68422 Incorrect argument reflection info for array_multisort()
Submitted: 2014-11-14 12:39 UTC Modified: 2014-11-24 00:42 UTC
From: lisachenko dot it at gmail dot com Assigned: stas (profile)
Status: Closed Package: Reflection related
PHP Version: master-Git-2014-11-14 (Git) OS:
Private report: No CVE-ID: None

 [2014-11-14 12:39 UTC] 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 ]
  }
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2014-11-24 00:42 UTC] stas@php.net

-Status: Open +Status: Closed -Assigned To: +Assigned To: stas