php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch tokenizer_patch_full.txt for Unknown/Other Function Bug #54089Patch version 2011-09-13 17:11 UTC Return to Bug #54089 | Download this patchThis patch is obsolete Obsoleted by patches: Patch Revisions: 2011-09-15 14:32 UTC | 2011-09-13 17:11 UTCDeveloper: nikic@php.netIndex: ext/tokenizer/tests/bug54089.phpt =================================================================== --- ext/tokenizer/tests/bug54089.phpt (revision 316815) --- ext/tokenizer/tests/bug54089.phpt (revision 316568) +++ ext/tokenizer/tests/bug54089.phpt (working copy) @@ -4,17 +4,26 @@ <?php if (!extension_loaded("tokenizer")) print "skip"; ?> --FILE-- +def +ghi ABC" Index: ext/tokenizer/tests/token_get_all_variation16.phpt =================================================================== --- ext/tokenizer/tests/token_get_all_variation16.phpt (revision 316815) --- ext/tokenizer/tests/token_get_all_variation16.phpt (revision 316568) +++ ext/tokenizer/tests/token_get_all_variation16.phpt (working copy) @@ -47,17 +47,17 @@ list($value1,$value2) = $c; } Done Index: ext/tokenizer/tokenizer.c =================================================================== --- ext/tokenizer/tokenizer.c (revision 316815) --- ext/tokenizer/tokenizer.c (revision 316568) +++ ext/tokenizer/tokenizer.c (working copy) @@ -32,8 +32,10 @@ #include "zend_language_scanner_defs.h" #include <zend_language_parser.h> Line 385 (now 385), was 18 lines, now 15 lines + int need_tokens = -1; // for __halt_compiler lexing. -1 = disabled array_init(return_value); @@ -150,11 +153,28 @@ @@ -150,11 +153,25 @@ } ZVAL_NULL(&token); + // after T_HALT_COMPILER collect the next three non-dropped tokens + if (need_tokens != -1) { + if (token_type != T_WHITESPACE && token_type != T_OPEN_TAG + && token_type != T_COMMENT && token_type != T_DOC_COMMENT + && --need_tokens == 0 + ) { + if (destroy && --need_tokens == 0) { + // fetch the rest into a T_INLINE_HTML + if (zendcursor != zendlimit) { + MAKE_STD_ZVAL(keyword); + array_init(keyword); |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Thu Apr 25 14:01:31 2024 UTC |