<?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
- Parse error: syntax error, unexpected ''Salary'' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /in/2U4U6 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/2U4U6 on line 7
Process exited with code 255.
preferences:
182.38 ms | 1395 KiB | 55 Q