Commit Graph

53 Commits

Author SHA1 Message Date
Etienne Kneuss
f6c2b4776c Fix bug #55445 (Incomplete implementation of <?= being independant of short_open_tag) 2011-08-17 23:50:04 +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
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
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
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
Rasmus Lerdorf
a546b3207f 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
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
4c7c9df815 Fixed multibyte related issues 2011-03-14 16:02:04 +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
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
Pierre Joye
4574844c52 - cleanup broken double definition of php_win_err and rename it while being there 2010-11-25 23:06:12 +00:00
Dmitry Stogov
ac71f49344 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 (regenerated scanner) 2010-11-24 05:42:52 +00:00
Pierre Joye
ef53214b1c - not used anymore 2010-09-15 16:58:11 +00:00
Dmitry Stogov
e3bb93480a Regenerated 2010-09-15 07:39:57 +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
0bba0bfdc8 regenerated files 2010-04-20 11:14:07 +00:00
Pierre Joye
15a3c450b7 - those are in 5.3.2 now, merge to 5.3.2 section is coming 2010-02-11 21:17:13 +00:00
Jani Taskinen
0f1b93a1ca - Fix skips 2009-09-10 15:05:34 +00:00
Matt Wilmas
e7c5f3cfa4 Regenerate 2009-05-05 01:44:52 +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
Rasmus Lerdorf
8eea998406 Unmangle 2009-02-14 21:20:16 +00:00
Rasmus Lerdorf
70ecb3074a 2.4.1 is safe 2009-02-14 21:08:02 +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
Marcus Boerger
7126de4912 - Next step in namespaces, using / as namespace separator. 2008-11-04 15:58:55 +00:00
Felipe Pena
df10005563 - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro 2008-10-24 14:35:40 +00:00
Dmitry Stogov
05376077b3 Fixed bug #45779 (regression with shebang lines processing) 2008-08-12 16:43:53 +00:00
Moriyoshi Koizumi
ba84cd7359 - Touch. 2008-07-28 07:02:05 +00:00
Moriyoshi Koizumi
4857586ec2 - Touch 2008-07-28 06:05:36 +00:00
Moriyoshi Koizumi
fa8f78d96c - touch 2008-07-28 06:00:15 +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
4f42ed39c0 - Revived zend multibyte 2008-07-24 22:21:41 +00:00
Nuno Lopes
620055c4c2 regenerate 2008-07-08 15:17:52 +00:00
Nuno Lopes
35233302e1 regenerate 2008-07-06 16:21:15 +00:00
Nuno Lopes
25d8eb1e40 regenerate 2008-07-06 15:53:37 +00:00
Rui Hirokawa
c3286f32ef implemented again zend-multibyte for PHP 5.3 2008-06-29 08:21:35 +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
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