PageRenderTime 39ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/zend/good/ext/standard/tests/array/natsort_basic.php

http://github.com/facebook/hiphop-php
PHP | 14 lines | 10 code | 0 blank | 4 comment | 0 complexity | df0fa6cc30ccc272b819f834e00f2634 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. <?hh
  2. /*
  3. * proto bool natsort ( array &$array )
  4. * Function is implemented in ext/standard/array.c
  5. */
  6. <<__EntryPoint>> function main(): void {
  7. $array1 = $array2 = varray["img12.png", "img10.png", "img2.png", "img1.png"];
  8. sort(inout $array1);
  9. echo "Standard sorting\n";
  10. print_r($array1);
  11. natsort(inout $array2);
  12. echo "\nNatural order sorting\n";
  13. print_r($array2);
  14. }