/hphp/test/zend/bad/ext/spl/tests/array_003.php
http://github.com/facebook/hiphop-php · PHP · 35 lines · 23 code · 9 blank · 3 comment · 0 complexity · 376ff90372a2b5652abc38b0f9381229 MD5 · raw file
- <?php
- // This test also needs to exclude the protected and private variables
- // since they cannot be accessed from the external object which iterates
- // them.
- class test
- {
- public $pub = "public";
- protected $pro = "protected";
- private $pri = "private";
-
- function __construct()
- {
- $this->imp = "implicit";
- }
- };
- $test = new test;
- $test->dyn = "dynamic";
- print_r($test);
- $object = new ArrayObject($test);
- print_r($object);
- foreach($test as $key => $val)
- {
- echo "$key => $val\n";
- }
- ?>
- ===DONE===
- <?php exit(0); ?>