PageRenderTime 36ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/hphp/test/slow/array_object/ksort.php

http://github.com/facebook/hiphop-php
PHP | 14 lines | 12 code | 2 blank | 0 comment | 0 complexity | d3c2159611889a7de6de6d174266f41c MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
  1. <?php
  2. $fruits = array(
  3. "d" => "lemon",
  4. "a" => "orange",
  5. "b" => "banana",
  6. "c" => "apple"
  7. );
  8. $fruitArrayObject = new ArrayObject($fruits);
  9. $fruitArrayObject->ksort();
  10. foreach ($fruitArrayObject as $key => $val) {
  11. echo "$key = $val\n";
  12. }