Commit Graph

960 Commits

Author SHA1 Message Date
Dmitry Stogov
0f2247ae94 Fixed bug #44414 (Incomplete reporting about abstract methods) 2008-03-12 09:46:42 +00:00
Robin Fernandes
0455ccb805 Remove inconsistent behaviour when a protected static prop is overridden by public static prop (details: http://turl.ca/phhhf ). 2008-03-03 15:07:04 +00:00
Johannes Schlüter
68de75f0b5 MFH: Allow implementation of abstract methods with optional parameters (Christian
Schneider)
2008-03-01 13:53:32 +00:00
Marcus Boerger
d3e5026564 - MFH Add E_DEPRECATED (Lars Strojny, Felipe Pena, Marcus)
[DOC] Finally added deprecation messages
2008-02-23 17:06:22 +00:00
Dmitry Stogov
8c32f99c25 Fixed bug #44184 (Double free of loop-variable on exception) 2008-02-20 12:05:57 +00:00
Dmitry Stogov
ddcf7a2f49 Added NEWDOC 2008-02-12 09:27:45 +00:00
Stanislav Malyshev
bbc813d360 fix folding 2008-02-12 01:17:48 +00:00
Stanislav Malyshev
fd597dce1b [DOC] Add compile-time __DIR__ constant which implements dirname(__FILE__) 2008-02-12 00:21:15 +00:00
Antony Dovgal
4252942abd MFH: fix typo and bug #43646 2008-01-29 00:07:26 +00:00
Dmitry Stogov
0095544c4d Additional executor specialization 2008-01-23 17:55:55 +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
b5c4244069 Fixed bug #43703 (Signature compatibility check broken) 2008-01-09 07:57:42 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Dmitry Stogov
5a3eb53723 Fixed bug #38469 (unexpected creation of cycle, json tests failed, leaks memory) 2007-12-28 13:22:00 +00:00
Dmitry Stogov
2fa0078a71 Initialize operand type 2007-12-28 09:46:52 +00:00
Dmitry Stogov
ba8dcae76d Use proper result type 2007-12-27 13:52:05 +00:00
Dmitry Stogov
64e8f22355 Allowed import of global classes "use ::GlobalClassName;" 2007-12-13 10:02:03 +00:00
Dmitry Stogov
80e77c1366 Allowed multiple namespaces per file (Gregory) 2007-12-13 08:57:52 +00:00
Dmitry Stogov
6484b3c458 Fixed bug #43344 (Wrong error message for undefined namespace constant) 2007-12-07 17:11:24 +00:00
Dmitry Stogov
d161978c56 Fixed uninitialized value 2007-12-04 12:38:42 +00:00
Dmitry Stogov
0f59a01e4a Fixed bug #43332 (self and parent as type hint in namespace) 2007-12-03 14:15:43 +00:00
Dmitry Stogov
648fbe9d58 Fixed bug #43128 (Very long class name causes segfault) 2007-11-22 13:27:13 +00:00
Dmitry Stogov
1836daf7f9 Fixed bug #43318
The "const" statement is still allowed outside of namespaces but arrays are disabled.
2007-11-22 10:46:26 +00:00
Dmitry Stogov
ea0a1c09e9 Speed-up of ZEND_DO_FCALL and ZEND_INIT_FCALL_BY_NAME by lowercasing and calculating hash values at compile time. 2007-11-22 09:02:55 +00:00
Johannes Schlüter
45f6b4ce2f - MFH Improved version of ternary shortcut (Marcus) 2007-11-21 09:41:35 +00:00
Dmitry Stogov
9f230a0d79 Added support for "namespace::" prefix that is resolved to current namespace name. 2007-11-20 08:53:02 +00:00
Antony Dovgal
714aad97e7 MFH: disallow multiple access modifiers and 'abstract abstract' methods (patch by Etienne Kneuss)
add tests
2007-11-13 16:52:14 +00:00
Dmitry Stogov
6d64218bc5 better error messages 2007-11-12 17:52:15 +00:00
Antony Dovgal
52e773740c MFH: fix error message (reported by Felipe Nascimento) 2007-11-12 16:55:44 +00:00
Dmitry Stogov
a90a0305b0 Fixed bug #43183 ("use" of the same class in difference scripts results in a fatal error) 2007-11-12 15:52:22 +00:00
Dmitry Stogov
8646d9afce Fixed type-hint compatibility check in namespaces 2007-11-09 13:34:39 +00:00
Dmitry Stogov
98b3c247a8 Fixed implementation of internal interfaces in namesapces 2007-11-09 12:15:41 +00:00
Dmitry Stogov
b7d87bebc9 T_IMPORT -> T_USE 2007-11-07 09:13:50 +00:00
Dmitry Stogov
f10766f1fb Reimplemented support for namespaces in indexes id constant arrays (removed zval.idx_type) 2007-11-02 10:11:42 +00:00
Dmitry Stogov
acd9a96010 Fixed bug #43027 (Declare cause fatal error) 2007-11-01 11:58:58 +00:00
Dmitry Stogov
1530fe99c8 Fixed variations of bug #35163 2007-10-23 12:52:40 +00:00
Dmitry Stogov
b599e434ad Fixed bug #35163 (Array elements can lose references) 2007-10-23 09:55:11 +00:00
Dmitry Stogov
1087e6b1e6 Fixed bug #42859 (import always conflicts with internal classes). (cellog@php.net, Dmitry) 2007-10-17 10:01:22 +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
220641af70 Fixed bug #42819 (namespaces in indexes of constant arrays) 2007-10-02 08:26:50 +00:00
Dmitry Stogov
0625e266cd Late Static Binding make no sense in compile-time constants. 2007-10-01 11:25:14 +00:00
Dmitry Stogov
41e9b6b61c Fixed bug #42802 (Namespace not supported in typehints) 2007-10-01 10:37:14 +00:00
Dmitry Stogov
72d0454bf6 Added support for __callstatic() magic method (missing part). (Sara) 2007-09-29 09:34:24 +00:00
Dmitry Stogov
b20ed0d2e0 Added support for __callstatic() magic method. (Sara) 2007-09-29 08:52:40 +00:00
Dmitry Stogov
166266df68 Added support for Late Static Binding. (Dmitry, Etienne Kneuss) 2007-09-29 07:28:34 +00:00
Dmitry Stogov
f32ffe9b43 Namespaces 2007-09-28 19:52:53 +00:00
Dmitry Stogov
6c810b0d4c Improved memory usage by movig constants to read only memory. (Dmitry, Pierre) 2007-09-27 18:00:48 +00:00
Jani Taskinen
ba144fd417 - Fix test and tuned error message 2007-09-20 14:11:32 +00:00
Dmitry Stogov
80d2409fd8 Improved compilation of heredocs and interpolated strings. (Matt, Dmitry) 2007-05-18 13:12:05 +00:00
Antony Dovgal
756f3f60ca MFH: fix #41351 (Invalid opcode with foreach ($a[] as $b)) 2007-05-11 09:39:36 +00:00
Dmitry Stogov
d8ce0568ef Fixed altering $this via argument named "this" 2007-05-04 06:18:53 +00:00
Dmitry Stogov
df61bae636 Reverted the following fixed because of php-5.2.2 release process
- Fixed altering $this via argument named "this".
- Fixed bug #41097 (ext/soap returning associative array as indexed without
  using WSDL).
- Fixed bug #41004 (minOccurs="0" and null class member variable).
2007-05-02 17:24:16 +00:00
Dmitry Stogov
688cc5039a Fixed altering $this via argument named "this" 2007-05-02 13:21:55 +00:00
Dmitry Stogov
e1814f0dbe WIN64 support 2007-04-16 08:09:56 +00:00
Ilia Alshanetsky
17c0c49a54 Addres limitation of __HALT_COMPILER() that allowed only one instance
per request.

# Patch by Greg Beaver
2007-04-04 00:42:42 +00:00
Dmitry Stogov
6458e42496 Fixed bug #40899 (memory leak when nesting list()) 2007-03-23 12:46:16 +00:00
Antony Dovgal
30f45e15de MFH: fix #40784 (Case sensivity in constructor's fallback) 2007-03-12 13:10:40 +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
Dmitry Stogov
ed30d91cd6 Fixed possible crash because of dereference of NULL 2007-02-01 15:23:46 +00:00
Antony Dovgal
7b70e5be45 missing comma 2007-01-15 10:08:34 +00:00
Antony Dovgal
9ca5652f70 fix error message and #40111 2007-01-15 10:04:44 +00:00
Dmitry Stogov
e470e22e20 - Fixed bug #35106 (nested foreach fails when array variable has a reference).
- Fixed bug #36214 (__get method works properly only when conditional operator is used).
- Fixed bug #39449 (Overloaded array properties do not work correctly).
- Fixed bug #39990 (Cannot "foreach" over overloaded properties).
2007-01-10 15:58:08 +00:00
Dmitry Stogov
8c086cae23 Fixed bug #40002 (Try/Catch performs poorly) 2007-01-09 15:06:07 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Ilia Alshanetsky
5ead613386 Fix a possible memory leak 2006-12-21 02:09:36 +00:00
Sara Golemon
db87e11e6b MFH: Bugfix# 39435: 'foo' instanceof bar gives invalid opcode error 2006-12-12 23:25:23 +00:00
Dmitry Stogov
68890ce196 Fixed bug #39721 (Runtime inheritance causes data corruption) 2006-12-05 19:03:51 +00:00
Ilia Alshanetsky
3b1e299264 Make use of abstract methods be E_STRICT rather then E_ERROR 2006-10-20 02:44:26 +00:00
Dmitry Stogov
c1ad451c3e Speedup array/HashTable copying. (Matt W) 2006-10-03 11:10:33 +00:00
Dmitry Stogov
cd6537ed6d Fixed bugs #34065 and #38623 (throw in foreach/switch causes memory leaks) 2006-09-19 21:36:54 +00:00
Dmitry Stogov
7e17f8591a Fixed bug #38772 (inconsistent overriding of methods in different visibility contexts) 2006-09-12 11:01:16 +00:00
Marcus Boerger
4da92e63af - MFH Yet another problematic case with mangled properties 2006-07-24 22:36:21 +00:00
Marcus Boerger
519ed8e13b - Better fix for #34505 and related, drop zend_unmangle_property_name_ex() 2006-07-24 17:58:32 +00:00
Dmitry Stogov
29ed52ffa4 New memory manager 2006-07-18 09:06:33 +00:00
Stefan Esser
7bbf35320d MFH: Added hook for compile_string() 2006-06-13 12:57:48 +00:00
Marcus Boerger
5cdefd07cd - MFH Fix issue with interfaces being inherited multiple times 2006-06-07 09:21:06 +00:00
Antony Dovgal
f6a400bd9f revert by Andi's request 2006-06-06 14:17:21 +00:00
Antony Dovgal
8204511d71 MFH: do not allow to implement the same interface twice
add tests
2006-06-06 10:03:01 +00:00
Marcus Boerger
d87de86823 - Switch back to old severities and still keep bugfix for
#37632 (Protected method access problem)
# It wasn't really my intention to change the severity. We simply didn't
# have tests for that.
2006-05-30 23:10:28 +00:00
Marcus Boerger
2d7d2aebe6 - MFH WS 2006-05-30 19:41:04 +00:00
Antony Dovgal
82d326bdea MFH: there is no ce at this point, revert this line to its previous state 2006-05-29 21:28:29 +00:00
Marcus Boerger
1b172b1371 - MFH Bugfix #37632 (Protected method access problem) 2006-05-29 20:06:43 +00:00
Johannes Schlüter
ccfc0d9d99 - MFH Fix #37614 (Class name lowercased in error message) 2006-05-27 18:23:48 +00:00
Marcus Boerger
7a5240e846 - MFH missing bits and pieces of the partial sync with head
# This time i added:
# ZEND_FE_RESET_VARIABLE
# ZEND_FE_RESET_REFERENCE
# and dapted parser,compiler,executor,interfaces to handle these flags
# their purpose is to be able to pass whetehr foreach is done by ref to
# the current() handler so that it can error out in case it is not capable
# to comply to the requested return signature/protocol/semantics (weyp).
2006-05-11 21:07:39 +00:00
Antony Dovgal
0f93228cb7 add missing ZEND_API to the implementation 2006-05-10 14:00:36 +00:00
Marcus Boerger
edfe649c6b - MFH Constructors in interfaces 2006-05-10 01:23:55 +00:00
Marcus Boerger
637a40423c - MFH as discussed
. zend_exception_get_default() -> zend_exception_get_default(TSRMLS_D)
  . zend_get_error_exception()   -> zend_get_error_exception(TSRMLS_D)
  . added E_RECOVERABLE_ERROR
  . added ZEND_TOSTRING_FUNC_NAME
  . added __tostring function cache to zend_class_entry
  . added ZEND_NAMED_ME
  . modified ZEND_ME_MAPPING to support method flags
  . added ZEND_MN
  . method entries now use prefix "zim_" instead of "zif_"
  . drop EG(ze1_compatibility_mode)
  . changed cast handler, now without (int should_free):
    typedef int (*zend_object_cast_t)(zval *readobj, zval *retval, int type TSRMLS_DC);
  . changed get_iterator, now receives whether value is by ref:
    zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC);
  . added zend_objects_store_add_ref_by_handle
  . added zend_objects_store_del_ref_by_handle
  . convert_to_explicit_type(pzv, type)
2006-05-09 23:53:23 +00:00
Dmitry Stogov
ab5a8b2ae3 Fixed possible crash in highlight_string() (proper place) 2006-05-02 15:49:26 +00:00
Dmitry Stogov
8d1cc50067 Fixed ossible crash in highlight_string(). 2006-05-02 07:19:00 +00:00
Dmitry Stogov
cde55c9223 Fixed meory leak in case of unknown pragma 2006-03-27 08:09:18 +00:00
Dmitry Stogov
608c3207a6 Removed unreachable code 2006-03-20 15:13:41 +00:00
Dmitry Stogov
7865dfb5b8 Eliminated run-time constant fetching for TRUE, FALSE and NULL 2006-03-15 09:04:36 +00:00
Andrei Zmievski
c009a4f361 Fix a bug where the default value for function argument could be an
array with array (!) keys.
2006-02-23 18:06:47 +00:00
Andi Gutmans
61e93ccfe8 - Update copyright notices to 2006 2006-01-04 23:53:05 +00:00
Marcus Boerger
18a99796ad - MFH Fix Bug #35720 A final constructor can be overwritten 2005-12-17 15:51:52 +00:00
Dmitry Stogov
8768ab94b3 Fixed bug #34729 (Crash in ZTS mode under Apache) 2005-12-01 11:48:17 +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
Dmitry Stogov
a570981151 Fixed bug #35360 (exceptions in interactive mode (php -a) may cause crash) 2005-11-24 11:33:11 +00:00
Dmitry Stogov
36d6ddc241 Bug #33732 (Wrong behavior of constants in class and interface extending) 2005-11-23 09:26:43 +00:00
Ilia Alshanetsky
0d088689c0 Removed {} E_STRICT pending furher discussion, may be introduced later on. 2005-11-22 19:46:13 +00:00
Ilia Alshanetsky
9aeb125f4a By popular demand the {} message is now an E_STRICT. 2005-11-16 15:10:56 +00:00
Ilia Alshanetsky
aab9009deb Added depreciation notice for {} string offset access. 2005-11-16 14:55:21 +00:00
Dmitry Stogov
b58ed261d7 Allow "null" default value for arguments with array type hint 2005-11-15 16:49:40 +00:00
Derick Rethans
aa9ea59851 - Allow "= null" default for parameters with a class type-hint. 2005-11-15 15:59:49 +00:00
Dmitry Stogov
cc50a96139 Fixed bug #34873 (Segmentation Fault on foreach in object) 2005-10-17 07:57:00 +00:00
Dmitry Stogov
b94970a3bd MFH 2005-10-10 10:50:16 +00:00
Dmitry Stogov
45794ee259 Fixed bug #34467 (foreach + __get + __set incosistency) 2005-10-10 09:50:05 +00:00
Dmitry Stogov
728acc3785 Fixed bug #34358 (Fatal error: Cannot re-assign $this) 2005-10-03 08:21:51 +00:00
Antony Dovgal
f43767b249 fix #34505 (possible memory corruption when unmangling properties with empty names)
1st part
2005-09-16 17:05:09 +00:00
Dmitry Stogov
8cf678c306 MFH (overriding of protected static property) 2005-09-16 13:42:49 +00:00
Dmitry Stogov
9305339d94 Changed "instanceof" and "catch" operators, is_a() and is_subclass_of() functions to not call __autoload(). 2005-09-09 06:48:49 +00:00
Dmitry Stogov
40f971b5b6 Fixed bug #34310 (foreach($arr as $c->d => $x) crashes) 2005-09-01 10:54:38 +00:00
Dmitry Stogov
248345d920 Support for class constants and static members for internal classes 2005-09-01 10:05:32 +00:00
Dmitry Stogov
ebd4ab4d78 Fixed bug #25359 (array_multisort() doesn't work in a function if array is global or reference) 2005-08-10 12:02:52 +00:00
Dmitry Stogov
aafc593eb5 Fixed possible memory corryption during compilation of <?php foreach($a as $b); ?> 2005-08-04 14:04:36 +00:00
foobar
916815b779 Bump up the year 2005-08-03 13:30:58 +00:00
Dmitry Stogov
7aca138456 Fixed bug #33710 (ArrayAccess objects doen't initialize $this) 2005-07-19 07:33:00 +00:00
Ilia Alshanetsky
96fc6717e9 Added missing init. 2005-07-17 19:17:10 +00:00
Dmitry Stogov
345e0255b5 Fixed bug #33512 (Add missing support for isset()/unset() overloading to complement the property get/set methods) 2005-07-07 16:07:09 +00:00
Dmitry Stogov
6bc321395d Partial fix for bug #26584 (Class member - array key overflow)
It doesn't fix integer overflow problem, but allows null, boolean and double keys in array constants in the same way as in runtime.
2005-06-24 09:24:42 +00:00
Dmitry Stogov
12b66c262a Fixed bug #30519 (Interface not existing says Class not found) 2005-06-24 08:45:17 +00:00
Dmitry Stogov
21e071be06 Fixed bug #33257 (array_splice() inconsistent when passed function instead of variable) 2005-06-22 08:33:00 +00:00
Dmitry Stogov
1098ec03c1 Remove unnecessary ZEND_FETCH_CLASS together with ZEND_DECLARE_INHERITED_CLASS in case of early binding 2005-06-21 12:05:15 +00:00
Dmitry Stogov
aedbdb087d Allowed return by refrence from internal functions 2005-06-16 14:56:13 +00:00
Dmitry Stogov
c3e6a90808 ZEND_UNSET_DIM_OBJ is splitted to ZEND_UNSET_DIM and ZEND_UNSET_OBJ. 2005-06-16 12:17:39 +00:00
Dmitry Stogov
6efa17c2a1 Merge three opcodes (ZEND_NEW, ZEND_JMP_NO_CTOR, ZEND_INIT_CTOR) into one (ZEND_NEW). There was no real reason for this anymore and API should be changed before 5.1 2005-06-10 07:56:40 +00:00
Stanislav Malyshev
2cb52151ac MF50: fix #29689 and more private property problems 2005-06-09 17:20:44 +00:00
Stanislav Malyshev
b83a2603b3 disallow abstrace private methods 2005-06-09 17:12:54 +00:00
Dmitry Stogov
d873ecb29c Fixed valgrind errors 2005-06-08 18:11:06 +00:00
Dmitry Stogov
55cdb7c043 Fixed lookups for previos opcodes 2005-06-08 15:01:35 +00:00
Dmitry Stogov
0a44789bf3 Fixed bug #30961 (Wrong linenumber in ReflectionClass getStartLine()) 2005-06-08 06:49:01 +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
Dmitry Stogov
91a344a504 Fixed bug #32428 (The @ warning error supression operator is broken) 2005-06-06 11:20:46 +00:00
Dmitry Stogov
89e53d5ab2 Fixed bug #30080 (Passing array or non array of objects) 2005-06-03 15:02:49 +00:00
Dmitry Stogov
6b39b374ef Fixed bug #27598 (list() array key assignment causes HUGE memory leak) 2005-06-03 13:57:26 +00:00
Marcus Boerger
4f9a2bed42 - Only allow changing return ref agnostic when a script method overrides an
internal method (found by dmitry)
2005-05-31 09:06:43 +00:00
Marcus Boerger
4918b67ac5 - Make zend_do_inheritance ZEND_API 2005-05-28 10:24:56 +00:00
Dmitry Stogov
1a72341328 Added array type hinting. (This patch requires full re-make) 2005-05-26 13:46:17 +00:00
Dmitry Stogov
79d6f11a4a Fixed bug #31525 (object reference being dropped. $this getting lost) 2005-05-05 17:37:25 +00:00
Dmitry Stogov
abb07db4c6 Fixed bug #29104 (Function declaration in method doesn't work) 2005-04-27 13:30:53 +00:00
Dmitry Stogov
694f7a9e90 Fixed bug #32427 (Interfaces are not allowed 'static' access modifier). 2005-04-26 08:48:23 +00:00
Dmitry Stogov
35b38598cc Fixed bug #29944 (Function defined in switch, crashes). 2005-04-25 09:56:42 +00:00
Marcus Boerger
20e67fd175 - Need to copy doc comments correct for properties 2005-04-24 17:32:05 +00:00
Marcus Boerger
67a226d910 - Add ReflectionProperty::getDocComment() 2005-04-19 22:04:59 +00:00
foobar
0e57528666 No c++ comments in C code 2005-04-19 11:41:04 +00:00
Marcus Boerger
0a93d54c53 - Bugfix #28442 2005-03-10 13:20:26 +00:00
Marcus Boerger
757da1eed5 - New Interface Serializeable
- Change signature of unserialize() callback to ease inheritance and
  support code reuse of handlers
2005-03-07 22:23:14 +00:00
foobar
0344652b38 Fixed compile warning (bug #32046) 2005-03-06 16:22:02 +00:00
Stanislav Malyshev
5b98a09219 Custom object serializer infrastructure
# The detailed announce on the list will follow
2005-02-23 11:15:51 +00:00
Dmitry Stogov
57d2c2bb83 Fixed possible memory corruption 2005-02-20 10:19:11 +00:00
Marcus Boerger
a29f5391db - Cleanup foreach handling 2005-02-11 22:26:45 +00:00
Dmitry Stogov
c91218ae8a Fixed bug introduced with foreach() optimization patch 2005-02-07 17:54:58 +00:00
Dmitry Stogov
625e06f454 Fixed FE_RESET/FE_FETCH bug.
Now FE_RESET instruction takes jump-address from itself, not from the following FE_FETCH instruction.
2005-02-07 16:44:00 +00:00
Dmitry Stogov
fc96c7f7fa foreash($a as $key => $val) optimization
Removed temorary array creation on each iteration.
2005-02-07 16:09:54 +00:00
Marcus Boerger
2d13dd0ef0 - Remove part of the cleanup which causes a problem with unnormal code
like tests/lang/040.phpt
# However there is a memleak introduced somewhen after august 04 for such
# code now, 5.0 and 4.3 are fine though.
2005-02-07 15:22:38 +00:00
Marcus Boerger
662cd8262e - Cleanup foreach statement 2005-02-05 14:01:59 +00:00
Andi Gutmans
8838c0f860 - Two new API calls for Derick (retreive CV name and value) by Dmitry 2005-01-22 02:29:18 +00:00
Dmitry Stogov
57a0c3e159 Fixed patch for bug #31478 (SegFault/Memory Leak with empty()) 2005-01-18 12:01:31 +00:00
Moriyoshi Koizumi
357b0c34b6 - Fix bug #31478 (segfault with empty()) 2005-01-11 17:17:48 +00:00
foobar
4cf9d27072 - Fixed bug #28930 (PHP sources pick wrong header files generated by bison) 2004-12-30 15:18:24 +00:00
Dmitry Stogov
7c83c4e418 Fixed bug #30922 (reflective functions crash PHP when interfaces extend themselves) 2004-12-06 11:53:30 +00:00
Andi Gutmans
f2c7379ca7 - One more test (WS) 2004-10-16 23:17:58 +00:00
Andi Gutmans
30ff6d2836 - WS fix to test commit 2004-10-16 23:16:50 +00:00
Anantha Kesari H Y
c3dbe168fb Fix for 30457 2004-10-16 09:28:45 +00:00
Andi Gutmans
3e382a7d06 - Don't allow access modifiers in interfaces. Explicitly stating public
- should also be disallowed but we don't have a way to detect it today.
2004-10-13 01:04:08 +00:00
Marcus Boerger
f71644b480 - Revert automatic pass arg_info
# We need to find a better solutions to prevent havy extension writer probs
2004-10-08 22:17:32 +00:00
Andi Gutmans
f9aef18c86 - Fix BC break with default in switch() having to be at the end. 2004-10-08 18:50:00 +00:00
Marcus Boerger
f916d603ef - Add arginfo ZEND_ARG_SEND_AUTOMATIC which lets the compiler automatically
determine whether pass by ref is possible or pass by value is needed.
# This is usefull when functions take array or string parameters as
# expressions. In such a case force by ref is not applicable and the
# executor would copy the variable unnecessarily as soon as it is at least
# once referenced.
2004-10-05 18:36:46 +00:00
Andi Gutmans
db507dd153 - Commit the variable fetch optimization.
- Extensions which delete global variables need to use new special function
- delete_global_variable() (I'm about to rename it) to remove them.
- Will post to internals@ or via commit messages if there's anything else.
2004-10-04 19:54:35 +00:00
Marcus Boerger
8e09f92917 - Fix warning 2004-09-27 08:46:12 +00:00
Andi Gutmans
d8efe626b5 - Fix bug #27669 (Dmitry).
Fixes:
<?
        class A
        {
                function hello()
                {
                        echo "Hello World\n";
                }
        }
        $y[0] = 'hello';
        A::$y[0]();
?>
2004-09-16 00:40:38 +00:00
Andi Gutmans
ab52308356 - This one fixes rather strange problem - ZE allows multiple declarations of the same class constant.
- It could be a minor BC break, but I'm sure it's a bug. (Antony Dovgal aka tony2001)
2004-09-10 06:13:13 +00:00
Andi Gutmans
6bd3c36a53 - Recommit:
- Check signature of magic methods
  - Register __get/__set/__call for internal classes
2004-09-09 16:51:45 +00:00
Andi Gutmans
96ab56e146 - Roll back VM commit 2004-09-09 16:47:22 +00:00
Marcus Boerger
be24e2455c - Check signature of magic methods
- Register __get/__set/__call for internal classes
2004-09-09 09:51:43 +00:00
Sebastian Bergmann
aab4ad1a8e Fugbix typo. 2004-09-02 17:27:44 +00:00
Marcus Boerger
1e708a5aeb Bugfix #29882 isset crashes on arrays 2004-08-29 13:28:03 +00:00
Marcus Boerger
ec4f576cb3 Enforce semantics: Classes cannot extend Interfaces 2004-08-26 22:59:25 +00:00
Marcus Boerger
08c344c293 Drop doubled check 2004-08-26 22:32:38 +00:00
Marcus Boerger
690b45afaa - Bugfix #29828 Interfaces no longer work 2004-08-26 22:25:55 +00:00
Marcus Boerger
efbfaec0a3 - Drop unused variable 2004-08-23 20:58:48 +00:00
Andi Gutmans
51501e8de0 - Improve performance of switch() 2004-08-23 20:16:35 +00:00
Sara Golemon
b5547442e5 Bugfix#29777 Some compilers don't like // style comments 2004-08-21 00:00:16 +00:00
Marcus Boerger
ce8331f9a5 Remove unnecessary check 2004-08-15 15:48:32 +00:00
Marcus Boerger
e45270dd2f Add missing check 2004-08-14 19:02:17 +00:00
Andi Gutmans
993f70c1d2 - Don't use magic numbers 2004-08-12 05:54:11 +00:00
Andi Gutmans
de25255b6d - Significantly improve performance of foreach($arr as $data). (Marcus) 2004-08-12 05:41:01 +00:00
Marcus Boerger
a0ff48dbd3 - Change to use memcmp instead of strcmp 2004-08-02 22:41:34 +00:00
Andi Gutmans
57d57237cf - Fix typo 2004-08-02 17:36:45 +00:00
Marcus Boerger
5f0433db83 MFB: Enforce protocol on magic methods/functions 2004-08-02 08:27:57 +00:00
Sara Golemon
d96e7a170c Revert goto opcode 2004-07-29 17:45:31 +00:00
Sara Golemon
8c844fdde3 Plug some memory leaks and promote unknown label to E_ERROR.
If someone tries to jump to a non-existant label execution really
shouldn't try to carry on.
2004-07-29 16:36:00 +00:00
Sara Golemon
5865b3680a Add goto operator by popular request. 2004-07-29 15:23:47 +00:00
Stanislav Malyshev
7bdc6d4bf4 add todo 2004-07-20 08:58:18 +00:00
Marcus Boerger
374ac86e33 #28589: Segfault in Reflection API 2004-05-31 21:38:01 +00:00
Andi Gutmans
4f77a021ce - Don't allow passing NULL to type hinted parameter. 2004-05-11 14:28:40 +00:00
Andi Gutmans
399073f9d4 - Fixed bug #27923. foreach() without a key should not check if the key
- is a reference (Adam)
2004-04-23 21:53:46 +00:00
Zeev Suraski
242aa98b0a Restore fatal error in case a method that's supposed to implement an
interface/abstract method, breaks its prototype
2004-04-21 08:44:37 +00:00
Marcus Boerger
aea24b2a79 Force destructors to have empty signatures 2004-03-26 20:05:35 +00:00
Andi Gutmans
e3eb8bdd78 - If __construct() is defined then it will always take precedence over
- old style constructors.
2004-03-25 18:00:50 +00:00
Andi Gutmans
34667c4b58 - Fix bug 2004-03-22 15:51:07 +00:00
Andi Gutmans
ed6cbcb480 - Change redefinition of constructor from E_COMPILE_ERROR to E_STRICT. 2004-03-18 08:52:51 +00:00
Stanislav Malyshev
c18c5be1e0 fix typo 2004-03-17 11:10:37 +00:00
Zeev Suraski
e2a5ebf597 Add ability to disable JIT for a particular auto global 2004-03-16 19:46:04 +00:00
Andi Gutmans
6a31fb9bb0 - Fix problem when using old-style constructors it wasn't being inherited
correctly.
2004-03-16 15:22:44 +00:00
Marcus Boerger
50ee116f08 Clearify the different method/class flags (as discussed with Andi). 2004-03-09 16:38:37 +00:00
Andi Gutmans
0fc9d5861d - Nuke unused code. 2004-03-09 15:27:39 +00:00
Andi Gutmans
2af86692ea - Fix some small problems I introduce in last patch. 2004-03-05 17:18:34 +00:00
Andi Gutmans
74775aa41a - Finally fix the following:
$xml_mem = simplexml_load_string('<bookbody><part><chapter><page>1</page></chapter></part></bookbody>');
/* The following works fine */
foreach ($xml_mem->part as $part) {
  foreach($part->chapter->page as $page) {
 print $page;
  }
}
/* The following segfaults */
foreach ($xml_mem->part as $part) {
  foreach($part->chapter as $chapter) { // Difference here from previous example
 print $chapter;
  }
}
2004-03-05 13:04:21 +00:00
Stanislav Malyshev
78a36b50a1 Disallow redefining ctors and cleanup 2004-03-04 10:02:59 +00:00
Andi Gutmans
41b7211539 - Fix leaks (although there might be still a problem here). 2004-03-02 11:03:48 +00:00
Andi Gutmans
576e16b03f - Fix crash in:
<?php
  class Foo {
    public $attributes=  array();

    function export() {
      foreach ($this->attributes as $name => $attr) {
      }
    }
  }

  $f= new Foo();
  $f->export();
?>
2004-03-02 08:28:12 +00:00
Andi Gutmans
63e263f32a - Change prototype isA check not to check the constructor.
- Only give an E_STRICT for non-isA compliant code as opposed to
  E_COMPILE_ERROR.
2004-02-29 18:25:50 +00:00
Marcus Boerger
f449c8fdf7 Fixes for abstract classes/methods 2004-02-27 09:14:55 +00:00
Zeev Suraski
62e921f824 Fix leak in foreach ($o->mthd()->arr) 2004-02-25 17:23:50 +00:00
Zeev Suraski
7086634a0b - Improve ARG_INFO() macros to support supplying required_num_args
- Initial fix for foreach($o->mthd()->arr) crash (now leaks)
2004-02-25 14:56:45 +00:00
Zeev Suraski
eb6fd52e21 - Rename compatiblity mode to zend.ze2_compatibility_mode (it doesn't only affect auto-clone).
- Perform implementation checks even with simple inheritance (off when
  compatibility mode is enabled).
- Restore default arguments in interfaces and handle it correctly.
- Move registration of internal classes later in the startup sequence
  in order to have INI options available.
2004-02-25 10:57:10 +00:00
Zeev Suraski
36a751840d - Abstract methods cannot have defaults for arguments
- Make function foo($a, $b=null) satisfy both foo($a) and foo($a, $b)
  prototypes
2004-02-25 09:25:37 +00:00
Marcus Boerger
b0ef896f0e Bugfix #27227 Mixed case class names causes Fatal Error in Constructor call 2004-02-16 00:34:23 +00:00
Zeev Suraski
e7e0f7d4b4 - Check return-by-reference bit when implementing interface prototypes
- Add infrastructure for built-in functions to hint whether they
  return by reference or not.  It is NOT currently used for anything,
  except for interface prototypes (you can use it to request that the
  function that implements your prototype returns by reference or
  doesn't return by reference).
  For downwards compatibility - by default, interface prototypes are
  agnostic as to whether the function that implements them returns
  by reference or not.  Use ZEND_BEGIN_ARG_INFO_EX() with
  ZEND_RETURN_VALUE/ZEND_RETURN_REFERENCE to change that.
- Fix ArrayAccess::getOffset() to conduct additional checks.
  If your getOffset() should work with multidimensional arrays - it
  must return by reference.
2004-02-12 13:49:55 +00:00
Marcus Boerger
c6cbafa273 Fix: <interface> [extends <interface> [, <ineterface>]* ] 2004-02-11 22:13:39 +00:00
Zeev Suraski
c01c44c2e2 Fix bug #26802 (the right aspects of it found by Marcus, anyway :) 2004-02-11 10:51:05 +00:00
Andi Gutmans
91ee6c0ceb - Nuke more unused code 2004-02-10 11:44:17 +00:00
Andi Gutmans
041b5dc2f7 - Remove junk 2004-02-10 10:44:09 +00:00
Ilia Alshanetsky
157a4e289a Fixed bug #27145 (Unmangle private/protected property names before printing
then inside error messages).
2004-02-05 02:16:08 +00:00
Zeev Suraski
d3c9467432 Fixlet 2004-02-04 18:24:44 +00:00
Zeev Suraski
bab3acc37b Fix handling of $this in some cases 2004-02-04 17:57:48 +00:00
Zeev Suraski
52b5f3fea1 Handle additional cases 2004-02-04 17:10:44 +00:00
Zeev Suraski
c5d842279c Reinstate early-binding for classes.
Note that this is available for downwards compatibility only - and it doesn't
work if you use new features (namely, interfaces).  Generally, people should
declare their classes before using them, but we just didn't want hell to break
loose (c)
2004-02-04 16:30:15 +00:00
Zeev Suraski
3df50001e1 - Improve $this assignment detection and generalize some code in zend_compile.c 2004-02-04 14:25:25 +00:00
Zeev Suraski
e1fc3963ee -Error out when trying to re-assign $this 2004-02-04 13:56:41 +00:00
Zeev Suraski
3ac58bffcf - Small fixes 2004-02-04 11:56:07 +00:00
Marcus Boerger
60a4a48e4e Fix Warning 2004-02-03 21:13:04 +00:00
Zeev Suraski
e4db2fb890 Remove unused variable 2004-02-03 15:51:09 +00:00
Zeev Suraski
e1bf9cc4c2 Remove redundant code 2004-02-03 14:31:07 +00:00
Zeev Suraski
848d4aed8a Perform a bitwise copy of the object even when __clone() is defined.
__clone() is back to not requiring any arguments, as $that is no longer
needed ($this already contains a copy of the original object, by the time
we __clone() is executed).
Calling the parent clone is done using parent::__clone()
2004-02-03 12:36:13 +00:00
Zeev Suraski
9e60cb553f Rewrote exception support. Fixes a few limitations and bugs in the old
implementation, and allows exceptions to 'fire' much earlier than before.

Instructions on how to use the new mechanism will follow on internals@
shortly...

Note - this (most probably) breaks the current implementation of
set_exception_handler()
2004-02-03 12:17:09 +00:00
Zeev Suraski
8e30d96ad8 Redesign the clone() feature to fix some fundamental flaws in the previous
implementation.

Using clone directly is now done using
$replica = clone $src;

Clone methods must now be declared as follows:
function __clone($that)
{
}

Clone methods in derived classes can call the __clone method of their parent
classes using parent::__clone($that)
2004-02-02 12:28:19 +00:00
Zeev Suraski
d45541b4fb Tweak checks to detect some additional cases.
Reorder checks to make more sense.
2004-01-28 22:27:39 +00:00
Zeev Suraski
be7d41b905 - Error message fix
- Prevent inheritance of the same constant from two interfaces
2004-01-28 11:53:52 +00:00
Zeev Suraski
a7ff369cac Fixlets 2004-01-28 10:52:27 +00:00
Zeev Suraski
2adaa11f2f Prevent classes from implementing interfaces that have the same function 2004-01-28 10:25:45 +00:00
Zeev Suraski
673e6e23e7 Code relayout 2004-01-28 09:13:41 +00:00
Marcus Boerger
3ca44539a1 Switch from ZEND_ACC_DYNAMIC to ZEND_ACC_ALLOW_STATIC and disallow calling
internal non-static methods statically.
# As discussed with Zeev:
# - For BC standard userspace methods allow this with an E_STRICT message.
# - If you want to implement an internal method taht can be called both
#   statically and non-statically then use flag ZEND_ACC_ALLOW_STATIC.
# - Magic user space methods __*() cannot and __construct, __destruct,
# __clone can never be called statically.
2004-01-24 16:59:24 +00:00
Marcus Boerger
6020ffd007 Simplify detection of methods that must be called dynamic (with object) 2004-01-23 22:04:42 +00:00
Marcus Boerger
7c2e02d380 Disallow static declaration of clone 2004-01-23 20:52:39 +00:00
foobar
796938ec7f Nuke compile warning by using the LANG_SCNG macro instead 2004-01-17 00:26:12 +00:00
Zeev Suraski
59d168eda7 Don't allow interfaces to implement anything 2004-01-14 14:00:11 +00:00
Andi Gutmans
92eb129bd9 - Return the PHP 4 behavior of not allowing class declerations within
- class declerations. This happened when declaring a class within a
- method.
class A {
	function foo() {
		class B {
		}
	}
}
2004-01-12 07:15:55 +00:00