Commit Graph

78 Commits

Author SHA1 Message Date
Johannes Schlüter
2198bbce86 Merge branch 'PHP-5.4' into PHP-5.5 2014-02-23 14:56:32 +01:00
Johannes Schlüter
3f258e6b46 Make sure value is initialized 2014-02-23 14:55:29 +01:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Pierrick Charron
8228597ecc Fixed bug #63874 (Segfaul if php_strip_whitespace has heredoc)
T_END_HEREDOC don't carry a token value anymore since commit 4cf90e06c
Bugfix by Nikita for bug #60097
2012-12-29 23:11:37 -05:00
Nikita Popov
4cf90e06c9 Fix lexing of nested heredoc strings in token_get_all()
This fixes bug #60097.

Before two global variables CG(heredoc) and CG(heredoc_len) were used to
track the current heredoc label. In order to support nested heredoc
strings the *previous* heredoc label was assigned as the token value of
T_START_HEREDOC and the language_parser.y assigned that to CG(heredoc).

This created a dependency of the lexer on the parser. Thus the
token_get_all() function, which accesses the lexer directly without
also running the parser, was not able to tokenize nested heredoc strings
(and leaked memory). Same applies for the source-code highlighting
functions.

The new approach is to maintain a heredoc_label_stack in the lexer, which
contains all active heredoc labels.

As it is no longer required, T_START_HEREDOC and T_END_HEREDOC now don't
carry a token value anymore.

In order to make the work with zend_ptr_stack in this context more
convenient I added a new function zend_ptr_stack_top(), which retrieves the
top element of the stack (similar to zend_stack_top()).
2012-03-31 21:53:30 +02:00
Felipe Pena
8775a37559 - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Dmitry Stogov
4a25a7740d Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Dmitry Stogov
e43ff1359e Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Dmitry Stogov
ab93d8c621 Added multibyte suppport by default. Previosly php had to be compiled with --enable-zend-multibyte. Now it can be enabled or disabled throug zend.multibyte directive in php.ini 2010-11-24 05:41:23 +00:00
Jani Taskinen
af49e58f51 - Reverted r296062 and r296065 2010-03-12 10:28:59 +00:00
Jani Taskinen
06f072cb5e MFH: Improved / fixed output buffering (Michael Wallner) 2010-03-11 10:24:29 +00:00
Sebastian Bergmann
d2281d1dff sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.php 2010-01-05 20:46:53 +00:00
Matt Wilmas
09034cf3f4 MFH: Implemented manual scanning for strings/comments, plus misc. fixes 2009-05-05 01:35:44 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Dmitry Stogov
478acfd8b4 . Added support for using static HEREDOCs to initialize static variables and class members or constants. (Matt)
. Improved syntax highlighting and consistency for variables in double-quoted strings and literal text in HEREDOCs and backticks. (Matt)
. Optimized interpolated strings to use one less opcode. (Matt)
2008-07-26 15:30:28 +00:00
Rui Hirokawa
c3286f32ef implemented again zend-multibyte for PHP 5.3 2008-06-29 08:21:35 +00:00
Marcus Boerger
af316021e8 - Rewrite scanner to be based on re2c instead of flex
The full patch is available as:
  http://php.net/~helly/php-re2c-5.3-20080316.diff.txt
  This is against php-re2c repository version 98
  An older patch against version 97 is available under:
  http://php.net/~helly/php-re2c-97-20080316.diff.txt
2008-03-16 21:06:55 +00:00
Dmitry Stogov
ddcf7a2f49 Added NEWDOC 2008-02-12 09:27:45 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Ilia Alshanetsky
b26d5f6077 Fixed bug #42767 (highlight_string() truncates trailing comment) 2007-09-26 15:43:58 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Andi Gutmans
61e93ccfe8 - Update copyright notices to 2006 2006-01-04 23:53:05 +00:00
Ilia Alshanetsky
3ce27140dc Fixed bug #35655 (whitespace following end of heredoc is lost). 2005-12-13 20:55:42 +00:00
Ilia Alshanetsky
497fae9d1f Fixed bug #35411 (Regression with \{$ handling).
Fixed bug #35382 (Comment in end of file produces fatal error).
2005-11-27 06:39:31 +00:00
foobar
916815b779 Bump up the year 2005-08-03 13:30:58 +00:00
Ilia Alshanetsky
76c05604a6 Fixed bug #29338 (unencoded spaces get ignored after certain tags). 2005-05-22 16:40:06 +00:00
Ilia Alshanetsky
ea7b61dfe5 Fixed bug #31371 (highlight_file() trims new line after heredoc). 2005-01-02 23:53:43 +00:00
foobar
4cf9d27072 - Fixed bug #28930 (PHP sources pick wrong header files generated by bison) 2004-12-30 15:18:24 +00:00
Ilia Alshanetsky
bf8a6a07d8 MFH: Fixed bug #29607 (highlighting code with HEREDOC produces invalid
output).
2004-08-11 22:38:32 +00:00
Ilia Alshanetsky
60b6ac053e Fixed bug #29606 (php_strip_whitespace() prints to stdout rather then
returning the value).
2004-08-10 22:16:46 +00:00
Derick Rethans
9be67e5a42 - Use <span> instead of <font> in highlight_string(). (Patch by mg@iceni.pl) 2004-02-25 14:14:47 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Ilia Alshanetsky
0688205940 Fixed Bug #26703 (Certain characters inside strings incorrectly treated as
keywords). Original patch by vrana@php.net.
2003-12-25 18:57:26 +00:00
Ilia Alshanetsky
99dec6927c Fixed bug #26463 (Incorrect handling of semicolons after heredoc) 2003-11-29 19:05:14 +00:00
Masaki Fujimoto
ab9dcec292 - added script encoding support to Zend Engine 2.
this enables ZE2 to gracefully parse scripts written in UTF-8 (with BOM),
  UTF-16, UTF-32, Shift_JIS, ISO-2022-JP etc... (when configured with
  '--enable-zend-multibyte' and '--enable-mbstring')
2003-08-11 05:24:42 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Andrei Zmievski
e6255b06b1 Revert portions of the doc comment patch. There should be no parser
errors now.
2003-04-02 16:13:12 +00:00
Andrei Zmievski
39d5a63803 - Keep track of starting/ending line numbers for user functions.
- Store last parsed doc comment in a compiler global for future use.
2003-03-19 21:17:47 +00:00
Ilia Alshanetsky
2b13eb4f53 More cleanup of the zend_strip() function.
No longer strip __LINE__, since while it may become useless it could break
code where __LINE__ is passed as a function parameter.
2003-03-06 15:38:28 +00:00
Ilia Alshanetsky
2cb46d4479 Fixed in zend_strip() that corrupted heredoc.
Optimized the writing routine by moving from putchar() to fwrite().
Changed hardcoded opcode # to it's defined name.
2003-03-06 14:47:13 +00:00
foobar
333406bdc2 - Added some missing CVS $Id$ tags, headers and footers. 2003-02-01 01:49:15 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Sebastian Bergmann
12642146c0 Sync zend_html_puts parameter list with Zend Engine 1. 2002-10-20 08:32:02 +00:00
Ilia Alshanetsky
94aaba773c Make zend actually strip comments. Bug #18151 2002-09-15 23:37:26 +00:00
Zeev Suraski
2931bb640d MFZE1 2002-05-12 15:59:29 +00:00