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

/hphp/test/slow/filesystem_iterator/next.php

http://github.com/facebook/hiphop-php
PHP | 14 lines | 13 code | 1 blank | 0 comment | 0 complexity | 2d850796439ec48fec3dc91ce7df36ca 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. <<__EntryPoint>>
  3. function main_next() {
  4. $sample_dir = __DIR__.'/../../sample_dir';
  5. $iterator = new FilesystemIterator($sample_dir);
  6. $ret = varray[];
  7. while($iterator->valid()) {
  8. $ret[] = $iterator->getFilename();
  9. $iterator->next();
  10. }
  11. asort(inout $ret);
  12. var_dump(array_values($ret));
  13. }