PageRenderTime 43ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/slow/array_object/print_r.php

http://github.com/facebook/hiphop-php
PHP | 13 lines | 10 code | 3 blank | 0 comment | 0 complexity | 0f3f6a886fd829c1b45cb4ee68288761 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. function test($flag = 0) {
  3. $ao = new ArrayObject([], $flag);
  4. $ao['foo'] = 'bar';
  5. $ao->bar = 'baz';
  6. print_r($ao);
  7. }
  8. test();
  9. test(ArrayObject::STD_PROP_LIST);
  10. test(ArrayObject::ARRAY_AS_PROPS);