#33983 [Opn->Bgs]: bugy result from get_all_tokens()

From: Date: Wed, 03 Aug 2005 20:20:56 +0000
Subject: #33983 [Opn->Bgs]: bugy result from get_all_tokens()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-82917@lists.php.net to get a copy of this message
ID: 33983 Updated by: sniper@php.net Reported By: smart at open-publisher dot net -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: XP PHP Version: 5.0.4 New Comment: 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.. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#82917) next »