<?php
$employees = array(
array(
'Name' => 'Scruffy',
'Role' => 'Janitor'
'Salary' => '16000'
),
array(
'Name' => 'Professor',
'Role' => 'CEO'
'Salary' => '120000'
),
array(
'Name' => 'Bender',
'Role' => 'Cook'
'Salary' => '1000'
),
array(
'Name' => 'Fry',
'Role' => 'Courier'
'Salary' => '33000'
)
);
$tmp = Array();
foreach($employees as $ma)
$tmp[] = $ma->Salary;
array_multisort($tmp, $employees);
- Output for 5.4.0 - 5.4.19, 5.5.0 - 5.5.3
- Parse error: syntax error, unexpected ''Salary'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /in/6NFTT on line 7
Process exited with code 255. - Output for 5.3.0 - 5.3.27
- Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /in/6NFTT on line 7
Process exited with code 255.
preferences:
179.56 ms | 1395 KiB | 59 Q