ID:               33983
 User updated by:  smart at open-publisher dot net
 Reported By:      smart at open-publisher dot net
 Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: XP
 PHP Version:      5.0.4
 New Comment:

Thanks for the lovely tip ... RTFM. 

The problem is that the content of this array that the function
get_all_tokens() return throw php in nirvana. Server message: "Document
contains no data". It toke hours to find out that this bug is
undebugable just by analyzing code line by line. A simple class methode
which is correctly executed until the last bracked hangs. 

class test
{

}

It's definetely a php internal error.


Previous Comments:
------------------------------------------------------------------------

[2005-08-03 22:20:55] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

It's inline HTML..RTFM..


------------------------------------------------------------------------

[2005-08-03 19:30:47] smart at open-publisher dot net

You can see that the array $tokens contains html fragments


<?php
    $tokens = token_get_all(file_get_contents("test.php"));
    echo "<pre>";var_dump($tokens);echo "</pre>";
?>

---- snip - test.php file to parse ----------
<html>
<head>
<meta name="keywords" content="">
<title>SMART3 - <?php echo "Hello World"; ?></title>
<script language="JavaScript" type="text/JavaScript">
</script>
</head>
<body>
</body>
</html>
---- end snip - test.php file to parse ----------

------------------------------------------------------------------------

[2005-08-03 18:14:59] smart at open-publisher dot net

Description:
------------
When parsing files that contains mixed html + php code with the
function get_all_tokens() the returned array contains a lot of html
fragments. Also when parsing some files the  returned array cause heavy
problems. The Server return "document contains no data". But the same
file is correctly parsed by the php interpreter. So i think the problem
is the function get_all_tokens().



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33983&edit=1

Reply via email to