Mantis - Quercus
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
5327 | minor | always | 01-08-13 10:38 | 01-08-13 13:17 | |
|
|||||
Reporter: | nam | Platform: | |||
Assigned To: | nam | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 4.0.34 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 4.0.34 | ||
|
|||||
Summary: | 0005327: object field foreach ordering does not match PHP | ||||
Description: |
(rep by K. Patel) Using Arrays: Array ( [List] => Array ( [Order0] => Zero [Order1] => One [Order2] => Two [Order3] => Three [Order4] => Four [Order5] => Five [Order6] => Six [Order7] => Seven ) ) $array_yo = array('List' => array('Order0' => 'Zero', 'Order1' => 'One', 'Order2' => 'Two', 'Order3' => 'Three', 'Order4' => 'Four', 'Order5' => 'Five', 'Order6' => 'Six', 'Order7' => 'Seven')); $json_yo = '{"List" : { "Order0" : "Zero", "Order1" : "One", "Order2" : "Two", "Order3" : "Three", "Order4" : "Four", "Order5" : "Five", "Order6" : "Six", "Order7" : "Seven" } }'; $object_yo = (object)array('List' => (object)array('Order0' => 'Zero', 'Order1' => 'One', 'Order2' => 'Two', 'Order3' => 'Three', 'Order4' => 'Four', 'Order5' => 'Five', 'Order6' => 'Six', 'Order7' => 'Seven')); echo '<hr>'; debug_var($array_yo, false, 'Using Arrays'); echo '<strong>The order listed via foreach:</strong> '; foreach ($array_yo['List'] as $row) { debug_var($row); } echo '<hr>'; debug_var($object_yo, false, 'Using stdClass Object'); echo '<strong>The order listed via foreach:</strong> '; foreach ($object_yo->List as $row) { debug_var($row); } |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
There are no notes attached to this issue. |