|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-02 08:10 UTC] derick@php.net
[2004-09-02 11:23 UTC] mattmecham at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Jan 13 11:00:01 2026 UTC |
Description: ------------ Unless something dramatic has changed in the way objects are handled, the code here will cause the browser to show "This document contains no data" whatever the subsequent output from the script. No entries into the apache error_log are made and E_ALL shows no errors. Problem seems to be with "foreach( $newclass->test_array...". Commenting this out removes the problem as does: $tmp = $newclass->test_array foreach( $tmp as $i ) Can give entire phpinfo() if required. Reproduce code: --------------- error_reporting ( E_ALL ); class someclass { var $test_array = array(); } $newclass = new someclass(); # Populate with dummy data.. for( $i=0; $i < 100 ; $i++ ) { $newclass->test_array[] = $i; } foreach( $newclass->test_array as $i ) { print $i."\n"; } print "Test"; exit();