Commit Graph

366 Commits

Author SHA1 Message Date
Nikita Popov
1823b16fa1 Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
Merging master to fix Windows build

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_vm_def.h
2012-08-20 13:37:53 +02:00
Stanislav Malyshev
3336e1e78c Merge branch 'pull-request/31'
* pull-request/31:
  Fix lexing of nested heredoc strings in token_get_all()
2012-08-19 21:43:04 -07:00
Nikita Popov
f4ce364628 Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
This is just an intial merge. It does not yet make generators and finally
work together.

Conflicts:
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	Zend/zend_vm_execute.skl
	Zend/zend_vm_opcodes.h
2012-08-13 16:54:53 +02:00
Xinchen Hui
80d5ae3cea Implemented 'finally' keywords for php
RFC: https://wiki.php.net/rfc/finally
FR: https://bugs.php.net/bug.php?id=32100
and I have got some improvment ideas(performance), will implemented
later. thanks
2012-08-13 21:48:39 +08:00
Nikita Popov
9b101ac8b3 Add T_YIELD "yield" keyword 2012-05-15 18:30:48 +02:00
Felipe Pena
45ef3c759e Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed Windows build
2012-04-30 15:56:15 -03:00
Felipe Pena
79961dccab - Fixed Windows build 2012-04-30 15:55:57 -03:00
Felipe Pena
73b6150992 Merge branch 'PHP-5.4'
* PHP-5.4:
  - Changed last commit to use VK_ESCAPE on Windows
2012-04-30 10:31:59 -03:00
Felipe Pena
3120387617 - Changed last commit to use VK_ESCAPE on Windows 2012-04-30 10:31:49 -03:00
Felipe Pena
bbe9eec9a2 Merge branch 'PHP-5.4'
* PHP-5.4:
  - Fixed bug #61827 (incorrect \e processing on Windows) patch by: ab@php.net
2012-04-29 19:36:10 -03:00
Felipe Pena
cc5b995c78 - Fixed bug #61827 (incorrect \e processing on Windows) patch by: ab@php.net 2012-04-29 19:35:52 -03:00
Nikita Popov
b233de098d Fix bug #61681: Malformed grammar
Generate T_STRING_VARNAME only if it actually is one. This is only the case
for "${varname}" and "${varname[offset]}" so we can just add a check for
} or [ after the LABEL.
2012-04-09 18:26:38 +02: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
Pierrick Charron
1953161b8c Fixed bug #61225 (Lexing 0b0*+<NUM> incorectly) 2012-03-02 02:36:31 +00:00
Pierrick Charron
f7cd0588a9 Fixed bug #61225 (Lexing 0b0*+<NUM> incorectly) 2012-03-02 02:36:31 +00:00
Etienne Kneuss
c51f737994 Fix #61095 (Lexing 0x0*+<NUM> incorrectly) 2012-02-20 18:28:57 +00:00
Etienne Kneuss
eefefddc0e Fix #61095 (Lexing 0x0*+<NUM> incorrectly) 2012-02-20 18:28:57 +00:00
Dmitry Stogov
b515bfbdfb Improved traits implementation. Now to support __CLASS__ constant in traits php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments. 2012-01-17 08:09:13 +00:00
Dmitry Stogov
032d140fd6 Improved traits implementation. Now to support __CLASS__ constant in traits php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments. 2012-01-17 08:09:13 +00:00
Nuno Lopes
a542baa720 fix memory leak in compile_string when there's a parse error (used e.g. in eval or assert) 2012-01-01 22:45:58 +00:00
Nuno Lopes
8b23cae172 fix memory leak in compile_string when there's a parse error (used e.g. in eval or assert) 2012-01-01 22:45:58 +00: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
Felipe Pena
a89f1d3cfa - Fixed bug #60350 (No string escape code for ESC (ascii 27), normally \e)
patch by: php at mickweiss dot com
2011-11-30 19:42:59 +00:00
Felipe Pena
3970865954 - Fixed bug #60350 (No string escape code for ESC (ascii 27), normally \e)
patch by: php at mickweiss dot com
2011-11-30 19:42:59 +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
Etienne Kneuss
cb8d6198df Fix bug #55445 (Incomplete implementation of <?= being independant of short_open_tag) 2011-08-17 23:50:04 +00:00
Etienne Kneuss
f6c2b4776c Fix bug #55445 (Incomplete implementation of <?= being independant of short_open_tag) 2011-08-17 23:50:04 +00:00
Hannes Magnusson
306c42023e Callable typehint following the rules of is_callable($arg, false); 2011-08-16 10:44:47 +00:00
Hannes Magnusson
550980cfe5 Callable typehint following the rules of is_callable($arg, false); 2011-08-16 10:44:47 +00:00
Derick Rethans
3ed828a892 - Fixed bug #55378: binary number literal returns float number though its value
is enough small
2011-08-07 17:36:31 +00:00
Derick Rethans
20936960b5 - Fixed bug #55378: binary number literal returns float number though its value
is enough small
2011-08-07 17:36:31 +00:00
Stefan Marr
65cbcb3be9 Fixed Bug #55214 use of __CLASS__ within trait returns trait name not class name [TRAITS] [DOC] 2011-07-31 18:18:56 +00:00
Stefan Marr
88f497f27d Fixed Bug #55214 use of __CLASS__ within trait returns trait name not class name [TRAITS] [DOC] 2011-07-31 18:18:56 +00:00
Stefan Marr
0158804a15 Added __TRAIT__ magic constant [TRAITS] [DOC]
# __TRAIT__ behaves like __CLASS__ more or less but is constraint to traits.
# Since traits are not types, there are not many valid use cases, and trying
# to use __TRAIT__ to make traits more like classes is discouraged.
2011-07-31 17:39:30 +00:00
Stefan Marr
dbc6849bca Added __TRAIT__ magic constant [TRAITS] [DOC]
# __TRAIT__ behaves like __CLASS__ more or less but is constraint to traits.
# Since traits are not types, there are not many valid use cases, and trying
# to use __TRAIT__ to make traits more like classes is discouraged.
2011-07-31 17:39:30 +00:00
Pierre Joye
4d0f1bfeb4 - add binary suport, FR #50638, as defined in RFC https://wiki.php.net/rfc/binnotation4ints, patch by Jonah Harris 2011-07-27 00:14:02 +00:00
Pierre Joye
6e4435d628 - add binary suport, FR #50638, as defined in RFC https://wiki.php.net/rfc/binnotation4ints, patch by Jonah Harris 2011-07-27 00:14:02 +00:00
Felipe Pena
72f7be3df0 - Improved parse error messages 2011-06-23 23:00:53 +00:00
Felipe Pena
0372e6ad80 - Improved parse error messages 2011-06-23 23:00:53 +00:00
Stanislav Malyshev
e18618905c scalar types cleanup 2011-06-03 01:09:32 +00:00
Stanislav Malyshev
d7c9c5af92 scalar types cleanup 2011-06-03 01:09:32 +00:00
Rasmus Lerdorf
a9a7f53636 Decouple <?= from the short_tags setting and make it always enabled 2011-05-19 16:26:29 +00:00
Rasmus Lerdorf
c24ef71e63 Decouple <?= from the short_tags setting and make it always enabled 2011-05-19 16:26:29 +00:00
Rasmus Lerdorf
a546b3207f oops, can't use that macro here 2011-05-16 17:26:10 +00:00
Rasmus Lerdorf
c5152b886b oops, can't use that macro here 2011-05-16 17:26:10 +00:00
Rasmus Lerdorf
a5eeecb13f Suppress a dozen unused return value warnings in places where the return
value is really not useful to us.
2011-05-16 17:22:41 +00:00
Rasmus Lerdorf
575ea1ef0b Suppress a dozen unused return value warnings in places where the return
value is really not useful to us.
2011-05-16 17:22:41 +00:00
Stanislav Malyshev
516c2f5920 removing scalar types in trunk 2011-05-15 00:36:13 +00:00
Felipe Pena
9e05a9ad13 - Removed unused variable (Pierrick) 2011-04-03 17:20:34 +00:00
Dmitry Stogov
bbc879b587 Fixed multibyte related issues 2011-03-14 16:00:59 +00:00
Moriyoshi Koizumi
cdb9ee0d1a Fix zend.multibyte oddities. Hope this will address all the known problems. 2011-03-06 07:00:30 +00:00
Ilia Alshanetsky
7a2157cf37 Fixed Bug #53629 (memory leak inside highlight_string()). 2011-01-03 14:39:48 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Felipe Pena
7c9fb17d00 - Fix build 2010-12-20 12:41:35 +00:00
Moriyoshi Koizumi
a304a0fc04 - Avoid allocating extra buffers. This makes parsing with zend.multibyte enabled as fast as with it disabled. 2010-12-20 03:16:09 +00:00
Moriyoshi Koizumi
bbf3d43c1e * Refactor zend_multibyte facility.
Now mbstring.script_encoding is superseded by zend.script_encoding.
2010-12-19 16:36:37 +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
Pierre Joye
1d04f413cf - NULL deref fix, patch by Gustavo 2010-11-17 16:46:19 +00:00
Dmitry Stogov
f2df6a4a3e - Improved memory usage
. zend_function.pass_rest_by_reference is replaced by
    ZEND_ACC_PASS_REST_BY_REFERENCE in zend_function.fn_flags
  . zend_function.return_reference is replaced by ZEND_ACC_RETURN_REFERENCE
    in zend_function.fn_flags
  . zend_arg_info.required_num_args removed. it was needed only for internal
    functions. Now the first arg_info for internal function (which has special
    meaning) is represented by zend_internal_function_info structure.
  . zend_op_array.size, size_var, size_literal, current_brk_cont,
    backpatch_count moved into CG(context), because they are used only during
    compilation.
  . zend_op_array.start_op is moved into EG(start_op), because it's used
    only for 'interactive' execution of single top-level op-array.
  . zend_op_array.done_pass_two is replaced by ZEND_ACC_DONE_PASS_TWO in
    zend_op_array.fn_flags.
  . op_array.vars array is trimmed (reallocated) during pass_two.
  . zend_class_entry.constants_updated is replaced by
     ZEND_ACC_CONSTANTS_UPDATED in zend_class_entry.ce_flags
  . the size of zend_class_entry is reduced by sharing the same memory space
    by different information for internal and user classes.
    See zend_class_inttry.info union.
2010-09-15 07:38:52 +00:00
Felipe Pena
f6f0f65b9c - Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3) 2010-06-30 02:45:10 +00:00
Felipe Pena
f2419953d9 - MF5.3: Reverted fix for bug #48930 (due binary compatibility breakage)
# To commit a new common fix
2010-06-30 02:30:14 +00:00
Felipe Pena
3396a6d185 - Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3) 2010-06-27 21:46:16 +00:00
Ilia Alshanetsky
33fae4caa0 Added support for numeric & scalar type hint as defined within
http://wiki.php.net/rfc/typecheckingstrictandweak RFC
2010-05-24 18:32:59 +00:00
Ilia Alshanetsky
ab9de550e2 Allow arbitrary number of space characters between type-hint and method/function parameter 2010-05-23 18:09:32 +00:00
Derick Rethans
1bc9247651 - Added scalar typehinting. 2010-05-20 19:18:35 +00:00
Stefan Marr
cd6415f1a9 Implemented Traits for PHP as proposed in the RFC [TRAITS]
# RFC http://wiki.php.net/rfc/horizontalreuse#traits_-_reuse_of_behavior
# Ok, here we go, I guess that will result in more discussion, which is fine
# by me. But now, the patch is here, and properly archived.
# 
# See below a list of notes to the patch, it also includes a list of
# points which should be fixed
# 
# Internals of the Traits Patch
# -----------------------------
# 
# Open TODOs
# """"""""""
# 
# - Reflection API
# - support for traits for internal classes
#   - currently destroy_zend_class does not handle that case 
# 
# Introduced Structures
# """""""""""""""""""""
# 
# Data structures to encode the composition information specified in the
# source:
#  - zend_trait_method_reference
#  - zend_trait_precedence
#  - zend_trait_alias
# 
# Changes
# """""""
# 
# zend_class_entry
#  - uses NULL terminated lists of pointers for
#    - trait_aliases
#    - trait_precedences
#    - do you prefer an explicit counter?
#    - the information is only necessary during class composition
#      but might be interesting for reflection
#    - did not want to blow up class further with not really necessary length counters
# 
# added keywords
#   - trait
#   - insteadof
# 
# Added opcodes
#  ZEND_ADD_TRAIT
#    - similar to ZEND_ADD_INTERFACE
#    - adds the trait to the list of traits of a class, no actual composition done
#  ZEND_BIND_TRAITS
#    - emitted in zend_do_end_class_declaration
#    - concludes the class definition and will initiate the trait composition
#      when the class definition is encountered during runtime
# 
# Added Flags
#   ZEND_ACC_TRAIT = 0x120
#   ZEND_ACC_IMPLEMENT_TRAITS = 0x400000
#   ZEND_FETCH_CLASS_TRAIT = 14
# 
# zend_vm_execute.h
#  - not sure whether the handler initialization (ZEND_ADD_TRAIT_SPEC_HANDLER,
#    ZEND_BIND_TRAITS_SPEC_HANDLER) is correct, maybe it should be more selective
# 
# zend_compile.c
#  - refactored do_inherit_method_check
#    split into do_inherit_method_check and do_inheritance_check_on_method
#  - added helper functions use a '_' as prefix and are not mentioned in the
#    headers
#  - _copy_functions
#    prepare hash-maps of functions which should be merged into a class
#    here the aliases are handled
#  - _merge_functions
#    builds a hash-table of the methods which need to be added to a class
#    does the conflict detection
#  - reused php_runkit_function_copy_ctor
#    - it is not identical with the original code anymore, needed to update it
#      think I fixed some bugs, not sure whether all have been reported back to runkit
#    - has to be renamed, left the name for the moment, to make its origin obvious
#    - here might be optimization potential
#    - not sure whether everything needs to be copied
#      - copying the literals might be broken
#        - added it since the literals array is freed by efree and gave problems
#          with doubled frees
#      - all immutable parts of the zend_op array should not be copied
#        - am not sure which parts are immutable
#        - and not sure how to avoid doubled frees on the same arrays on shutdown
#  - _merge_functions_to_class
#    does the final merging with the target class to handle inherited
#    and overridden methods
#  - small helper for NULL terminated lists
#    zend_init_list, zend_add_to_list
# 
# zend_language_parser.y
#  - reused class definition for traits
#    - there should be something with regard to properties
#      - if they get explicitly defined, it might be worthwhile to
#        check that there are no collisions with other traits in a composition
#        (however, I would not introduce elaborate language features to control that
#         but a notice for such conflicts might be nice to the developers)
2010-04-22 22:05:56 +00:00
Dmitry Stogov
dd5c478be6 Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed. 2010-04-20 11:05:54 +00:00
Sebastian Bergmann
3defe76254 sed -i "s#1998-2009#1998-2010#g" **/*.re **/*.y **/*.l 2010-01-05 20:40:23 +00:00
Felipe Pena
5dd6b9ffa9 - Fixed bug #50145 (crash while running bug35634.phpt) 2009-11-17 11:18:40 +00:00
Matt Wilmas
09034cf3f4 MFH: Implemented manual scanning for strings/comments, plus misc. fixes 2009-05-05 01:35:44 +00:00
Dmitry Stogov
7ef3db0e4e Fixed bug #47516 (nowdoc can not be embed in heredoc but can be embed in double quote) 2009-03-26 12:37:54 +00:00
Dmitry Stogov
bcd9099b28 Fixed bug #47038 (Memory leak in include) 2009-03-25 15:23:58 +00:00
Brian Shire
dd031eee68 MFH: Fix scanner handling of NULL values in heredoc, nowdoc, strings, comments, and non-parsed content. 2009-03-16 01:40:14 +00:00
Brian Shire
9c16bfa194 MFH: Add proper EOF handling for language scanner. Fixes bug #46817. 2009-03-11 22:11:53 +00:00
Ilia Alshanetsky
71ea95354b MFH: Corrected fix for bug #46844 to only trigger on the 1st line of CLI
opened files.
2009-01-09 17:21:12 +00:00
Felipe Pena
bfcea7ffa8 - MFH: Year++ 2009-01-02 20:45:43 +00:00
Ilia Alshanetsky
fec58a89ee Fixed bug #46844 (php scripts or included files with first line starting
with # have the 1st line missed from the output).
2009-01-01 20:16:24 +00:00
Marcus Boerger
7126de4912 - Next step in namespaces, using / as namespace separator. 2008-11-04 15:58:55 +00:00
Felipe Pena
85ab423565 - MFH: Removed some TSRMLS_FETCH()s 2008-08-15 19:47:33 +00:00
Dmitry Stogov
05376077b3 Fixed bug #45779 (regression with shebang lines processing) 2008-08-12 16:43:53 +00:00
Felipe Pena
555a9b0768 - MFH: Fixed BC break: The magic constants must be case-insensitive. 2008-07-30 01:25:49 +00:00
Moriyoshi Koizumi
b9eaa80150 - SCNG(input_filter) can be null if the script encoding is idential to
the internal encoding.
2008-07-28 07:01:54 +00:00
Moriyoshi Koizumi
1782511e72 - WS 2008-07-28 06:05:14 +00:00
Moriyoshi Koizumi
a28497d6e5 - Fix __halt_compiler() weirdness with zend-mulibyte enabled 2008-07-28 05:59:17 +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
Moriyoshi Koizumi
20bca30d04 - No need to advance the cursor 2008-07-24 23:53:42 +00:00
Moriyoshi Koizumi
4f42ed39c0 - Revived zend multibyte 2008-07-24 22:21:41 +00:00
Nuno Lopes
b8673e35a0 now really fix once and for all the #-style comments.
also remove some duplicated code in <?, <%, <%= handlers. this also has the side-effect of producing better bytecodes in some special cases
2008-07-08 15:16:35 +00:00
Nuno Lopes
ea11f6df43 fix last part of bug #44654 2008-07-06 16:20:51 +00:00
Nuno Lopes
3ba706cc62 fix first part of bug #44654: scan for opening tag <? after a # char 2008-07-06 15:53:23 +00:00
Rui Hirokawa
e59fb93765 update zend_language_scanner.l to maintain the dependencies. 2008-06-29 11:20:18 +00:00
Rui Hirokawa
c3286f32ef implemented again zend-multibyte for PHP 5.3 2008-06-29 08:21:35 +00:00
Matt Wilmas
c83d916a98 MFH: Restore end check for "escape" strings 2008-05-10 09:17:29 +00:00
Matt Wilmas
c4e406d24d MFH: Fix loss of backslash at end of heredoc; For bug #44830 (Very minor issue with backslash in heredoc) 2008-05-09 10:27:51 +00:00
Nuno Lopes
7507ff326e fix heredoc+nowdoc
#patch by Matt Wilmas
2008-04-10 19:19:04 +00:00
Nuno Lopes
cfc1756221 fix the yyless() definition to match flex one and revert part of last patch (so that it remains similar with flex's scan) 2008-04-09 22:01:20 +00:00
Scott MacVicar
6f20cea6d8 Fixes to heredoc and cleanup of new re2c scanner. (Patch by Matt Wilmas) 2008-04-09 20:50:58 +00:00
Felipe Pena
b9d13d8f17 - Allow HEREDOC syntax with double quotes
(http://wiki.php.net/rfc/heredoc-with-double-quotes)
2008-04-05 22:29:08 +00:00
Nuno Lopes
bfcdbbcd33 add sanity checks for ZEND_MMAP_AHEAD and reduce the value from 32 to 16 (lowest safe value) 2008-04-04 15:01:23 +00:00
Felipe Pena
f66f55edc5 MFH: Implemented "jump label" operator (limited "goto")
[DOC]
2008-03-28 14:35:01 +00:00
Marcus Boerger
0893c3e2c9 - Another re2c version bump and scanner regeneration
# It appears no one has used re2c in the way we do
2008-03-22 17:59:52 +00:00
Marcus Boerger
07e3598762 - Fix YYFILL() 2008-03-21 18:47:26 +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
Stanislav Malyshev
fd597dce1b [DOC] Add compile-time __DIR__ constant which implements dirname(__FILE__) 2008-02-12 00:21:15 +00:00
Dmitry Stogov
fa47e900e2 Changed exception handling. Now each op_array doesn't contain ZEND_HANDLE_EXCEPTION opcode in the end 2008-01-21 19:39:55 +00:00
Dmitry Stogov
b7d87bebc9 T_IMPORT -> T_USE 2007-11-07 09:13:50 +00:00
Yiduo (David) Wang
4b4d634cb9 MFH: Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:22:07 +00:00
Dmitry Stogov
f32ffe9b43 Namespaces 2007-09-28 19:52:53 +00:00
Ilia Alshanetsky
8ff31493b7 Fixed bug #42590 (Make the engine recornize \v and \f escape sequences) 2007-09-09 16:33:34 +00:00
Dmitry Stogov
9bca44df22 Impoved error reporting on parser errors (Matt, Dmitry) 2007-05-24 08:56:35 +00:00
Dmitry Stogov
80d2409fd8 Improved compilation of heredocs and interpolated strings. (Matt, Dmitry) 2007-05-18 13:12:05 +00:00
Antony Dovgal
f6cef916bc MFH: fix #41118 (PHP does not handle overflow of octal integers) 2007-04-22 21:33:10 +00:00
Marcus Boerger
50ea26760d - Avoid sprintf, even when checked copy'n'paste or changes lead to errors 2007-02-24 02:17:47 +00:00
Dmitry Stogov
0291ad5fa6 Fixed bug #40236 (php -a function allocation eats memory) 2007-02-15 10:38:28 +00:00
Ilia Alshanetsky
4383f51c44 Syntax highlighting fix for hex numbers.
# Patch by Matt Wilmas
2007-01-18 23:28:08 +00:00
Andrei Zmievski
39fa36a0be Fix 'b' prefix in highlighting and tokenizer. (Matt W) 2007-01-09 17:37:53 +00:00
Ilia Alshanetsky
ff9d0fcc78 is_numeric_string() optimization
# Original Patch by Matt Wilmas
2006-12-26 16:44:20 +00:00
Andrei Zmievski
0d7af28a40 More correct patch for b-prefixes. 2006-12-20 18:22:07 +00:00
Andrei Zmievski
16ea2ee640 Support 'b' prefix in front of string literals for forward compatibility
with PHP 6.
2006-12-19 17:26:17 +00:00
Antony Dovgal
090215cc7f nullify opened_path and filename (when required)
fixes invalid reads with `php-cli -F <script>`
2006-11-23 22:04:54 +00:00
Derick Rethans
140edac7f9 - Forward port the binary cast, which will do the same as the string cast in
PHP 5.2.
2006-11-10 12:02:51 +00:00
Dmitry Stogov
67abcb58c3 Fixed bug #36513 (comment will be outputed in last line) 2006-04-13 13:48:28 +00:00
Dmitry Stogov
0f4302b872 Fixed bug #36037 (heredoc adds extra line number) 2006-01-17 09:39:57 +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
3d4c1d6886 Improve fix for bug #35382 2005-12-08 03:09:14 +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
Marcus Boerger
46ae03d872 - MFH Fix bug #35406 eval hangs when evall'ed code ends with comment w/o newline 2005-11-26 13:11:26 +00:00
Marcus Boerger
19ea8abd09 - MFH Fixed Bug #35286 tokenizer ext drops final comment (by greg) 2005-11-21 19:24:38 +00:00
Dmitry Stogov
a8c6b992b8 Fixed bug #35147 (__HALT_COMPILER() breaks with --enable-zend-multibyte) 2005-11-15 13:29:39 +00:00
Dmitry Stogov
187b6cc583 Fixed bug #31341 (escape on curly inconsistent) 2005-10-21 13:22:05 +00:00
Dmitry Stogov
7c3bdf444d Fixed bug #34782 (token_get_all() gives wrong result) 2005-10-21 09:32:40 +00:00
foobar
916815b779 Bump up the year 2005-08-03 13:30:58 +00:00
Rasmus Lerdorf
ec58143e93 Valgrind is unhappy that this is not initialized 2005-07-18 18:32:36 +00:00
Zeev Suraski
ff06fb72de Fixlet 2005-06-16 13:31:21 +00:00
Dmitry Stogov
f3ebf7dd91 Fixed bug (Crash on Windows and ZTS) that was introduced with fix for bug #26456 2005-06-09 08:52:51 +00:00
Dmitry Stogov
58a0ee09c3 Fixed bug #26456 (Wrong results from Reflection-API getDocComment() when called via STDIN) 2005-06-07 18:11:56 +00:00
Wez Furlong
42ada22e0c Avoid double-freeing streams.
This can happen because all streams are registered as resources;
the engine also tracks them in the open_files global.

Avoid the potential for double-freeing by simply making streams exposed to the
engine have no closer for the engine to call; they will already be in the
resource list, and thus will be shut down properly at request end.
2005-06-06 01:51:48 +00:00
Zeev Suraski
d33500ee20 Thought I committed it ages ago... Anyway, without further delays, the final
__halt_compiler() patch
2005-06-04 16:16:19 +00:00
Zeev Suraski
118b7b567a Revert // </script> patch 2005-03-07 16:48:49 +00:00
foobar
143d62a179 Fix the fix for one line comments with <script..> </script> tags 2005-03-01 02:17:41 +00:00
Andi Gutmans
ac63e8c2c1 - Make one line comments work the same with <script ...> </script> as with
- other tags. This will break scripts that have whitespace at the end
- of the closing tag </script    > but this is barely used as it is
- and I doubt ppl used whitespace. (patch by Jani)
2005-02-24 19:25:44 +00:00
Rui Hirokawa
539b81e03a fixed #31987 zend-multibyte in ZTS. 2005-02-19 14:33:41 +00:00
Marcus Boerger
e3a5c9f1d7 - Fix doc comment handling 2005-02-13 13:50:48 +00:00
foobar
37d820b03f - Fixed bug #31444 (Memory leak in zend_language_scanner.c) 2005-01-17 17:20:56 +00:00
Stanislav Malyshev
52ffca0b27 Fix the following nasty bug:
- if compile bails out from the middle of compiling, current_buffer is not restored
- if current_buffer is not null, yy_switch_to_buffer will do: *yy_c_buf_p = yy_hold_char; on
the next request
- which would lead to memory corruption on next request
2005-01-03 10:01:03 +00:00
foobar
4cf9d27072 - Fixed bug #28930 (PHP sources pick wrong header files generated by bison) 2004-12-30 15:18:24 +00:00