note 80340 added to function.token-get-all

From: Date: Thu, 10 Jan 2008 19:01:07 +0000
Subject: note 80340 added to function.token-get-all
Groups: php.notes 
Request: Send a blank email to php-notes+get-135011@lists.php.net to get a copy of this message
Complementary note to code below: Note that only the FIRST 2 (or 3, if needed) array elements will be updated. Since I only encountered incorrect results on the FIRST occurence of T_OPEN_TAG, I wrote this quick fix. Any other following T_OPEN_TAG are, on my testing system (Apache 2.0.52, PHP 5.0.3), parsed correctly. So, This function assumes only a possibly incorrect first T_OPEN_TAG. Also, this function assumes the very first element (and ONLY the first element) of the token array to be the possibly incorrect token. This effectively translates to the first character of the tokenized source to be the start of a php script opening tag '<', followed by either 'php' OR '%' (ASP_style) ---- Server IP: 69.147.83.197 Probable Submitter: 62.45.6.85 ---- Manual Page -- http://www.php.net/manual/en/function.token-get-all.php Edit -- https://master.php.net/note/edit/80340 Del: integrated -- https://master.php.net/note/delete/80340/integrated Del: useless -- https://master.php.net/note/delete/80340/useless Del: bad code -- https://master.php.net/note/delete/80340/bad+code Del: spam -- https://master.php.net/note/delete/80340/spam Del: non-english -- https://master.php.net/note/delete/80340/non-english Del: in docs -- https://master.php.net/note/delete/80340/in+docs Del: other reasons-- https://master.php.net/note/delete/80340 Reject -- https://master.php.net/note/reject/80340 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#135011) next »