2 /* Prototype : bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING|SORT_NATURAL|SORT_FLAG_CASE]] [, array ar2 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING|SORT_NATURAL|SORT_FLAG_CASE]], ...])
3 * Description: Sort multiple arrays at once similar to how ORDER BY clause works in SQL
4 * Source code: ext/standard/array.c
9 class classWithToString
{
10 public function __toString() {
11 return "Class A object";
15 class classWithoutToString
{ }
16 <<__EntryPoint
>> function main(): void
{
17 echo "*** Testing array_multisort() : usage variation - test sort order of all types***\n";
21 'float -10.5' => -10.5,
23 'uppercase NULL' => NULL,
24 'lowercase true' => true,
25 'empty string DQ' => "",
26 'string DQ' => "string",
27 'instance of classWithToString' => new classWithToString(),
28 'instance of classWithoutToString' => new classWithoutToString(),
29 'undefined var' => @$undefined_var,
32 var_dump(array_multisort1(&$inputs));