1 <?php 2 class Foo {} 3 4 class Bar { 5 protected $foo = array(); 6 7 public function __construct() { 8 $this->foo = array(new Foo, new Foo); 9 foreach ($foo as $bar) {} 10 } 11 } 12 13 new Bar; 14 ?>
Warning: Invalid argument supplied for foreach() in E:\test.php on line 9 -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php