/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

  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);