|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7893 Parser cannot return from method in object called by xml_parse
Submitted: 2000-11-20 12:21 UTC Modified: 2000-11-22 05:40 UTC
From: marek dot berkan at e-point dot pl Assigned:
Status: Closed Package: *XML functions
PHP Version: 4.0.2 OS: Linux Debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: marek dot berkan at e-point dot pl
New email:
PHP Version: OS:


 [2000-11-20 12:21 UTC] marek dot berkan at e-point dot pl
I have an object that implement XML parser. One of its' method is called when parser found start tag. If I use in this method functions who operating on associative array (i.e. each, next or current) that PHP engine run to end of this method and stopping. If I don't use flush() function in script then no content is sending to client. So if I use flush function then content generated before is sending.

There is some example:

class XMLParser {
var $parser; 
var $depth;
function XMLParser () {
	$depth = array();
	$this->parser = xml_parser_create();
function open_tag($parser, $tag, $attrs) {
	echo "Before";
	$atrybuty = array();
	$atrybuty["klucz1"] = "wartosc1";
	$atrybuty["klucz2"] = "wartosc2";
	while (list($klucz, $wartosc) = each ($atrybuty)) {
		echo $klucz." => ".$wartosc.", "; 
	echo "After";
function close_tag($parser, $tag) {
function cdata($parser, $cdata) {
function parseFile($data) {
} // end of XMLParser object

$test = new XMLParser();                                  // create object
$test->parseFile('<A ID="hallo">PHP</A>');       // start parser


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-22 05:40 UTC] marek dot berkan at e-point dot pl
This bug is resolved in PHP v. 4.0.3. Sorry.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Sep 24 08:01:25 2023 UTC