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
Wez Furlong
910e20064a
TSRMLS fix
2004-01-11 21:39:40 +00:00
Andi Gutmans
e69f4f6f25
- This should fix the problem of conditional function decleration on the
...
- same line of code not to work. You should re-evaluate your coding style
- if you really code this way :)
2004-01-11 19:27:13 +00:00
Stanislav Malyshev
c4b6a637e5
Bug #25816 - disallow arrays in class constants
2004-01-09 14:02:33 +00:00
Stanislav Malyshev
e321eba06b
Fix Bug #26077 - memory leak when new() result is not assigned
...
and no constructor defined
2004-01-09 13:52:19 +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
Derick Rethans
6923a16c26
- Fixed var_export() to show public, protected and private modifiers properly.
...
- Exported (un)mangle_property_name.
2004-01-03 13:51:02 +00:00
Marcus Boerger
15964bb35d
Fix order of class_entry member initialization (needed for example for DOM)
...
# You need to completley rebuild PHP after this patch.
2003-12-28 15:18:05 +00:00
Marcus Boerger
50888a100c
Preserve class name casing.
2003-12-22 22:34:28 +00:00
Dmitry Stogov
3c4cfd3ec8
Dynamic function call from object's property was fixed
...
(See "tests/lang/bug24926.phpt" and "tests/lang/bug25652.phpt")
2003-12-17 14:45:59 +00:00
Stanislav Malyshev
6d5eb809be
export class initialization function
2003-12-16 10:51:51 +00:00
Zeev Suraski
3a42babad6
Fix behavior of return-by-reference functions. Remove erroneous warnings,
...
add E_STRICT warnings in case you return something by reference that you're
not supposed to (anything that's not a variable, or a return-value of a
function that returned by reference).
2003-12-14 16:09:07 +00:00
Marcus Boerger
8a8deee8a0
This test is against interfaces not abstract classes.
2003-12-06 19:02:12 +00:00
Andi Gutmans
f4d6a5c7cf
- Remove two unneeded convert_to_string() (found by Marcus)
...
- Change illegal use of string offset to E_ERROR
2003-12-05 16:28:54 +00:00
Andi Gutmans
d7f839cce7
- Fix for bug #26182
2003-12-02 12:06:03 +00:00
Marcus Boerger
af5489d91b
Revert accidential commit until decision
2003-11-29 17:05:17 +00:00
Marcus Boerger
9ffd44e94a
Make exception code more robust:
...
- Fix error in calculation of trace-string length
- Allow to overload __strostring() and make it work for uncaught exceptions
- Show exception thrown while displaying exceptions
2003-11-29 17:03:45 +00:00
Andi Gutmans
d344648b07
- Fix __autoload() to preserve class case.
...
- Heads up, this patch might break stuff so please let me know if you
- bump into any problems.
2003-11-24 18:13:29 +00:00
Marcus Boerger
1eaf126a7a
Backpatch the correct opcode for list(), property overloading needs more
...
opcodes (Bugfix #26257 ).
2003-11-18 07:19:55 +00:00
Andi Gutmans
db2a1f4590
- Make sure internal clasess are malloced
2003-11-13 06:40:34 +00:00
Marcus Boerger
296529b886
Split isset/isempty for object property and object dimension hooking.
2003-11-10 16:14:44 +00:00
Marcus Boerger
77923b0eb1
Add missing initialization.
2003-11-07 10:22:16 +00:00
Stanislav Malyshev
44c3f0066b
make CATCH opcode use "class" T like other opcodes do - via IS_CONST
2003-10-30 11:11:48 +00:00
Shane Caraveo
4bde74c3be
fix crash in do_implement_interface when compiling
...
pear/PHPUnit/Framework/TestCase.php line 63
while only interface_gets_implemented is the issue in this instance, both
these vars were unitialized, causing potential other issues
2003-10-28 05:24:46 +00:00
Marcus Boerger
3c62b3b5ac
Expand Interface C API.
...
In short: zend_class_entry->interface_gets_implemented() allows to modify
the class entry of a class when an interface gets implemented.
2003-10-22 19:59:58 +00:00
Marcus Boerger
b0b82541e8
Fix class/iterator relationship & handling
2003-10-18 18:43:31 +00:00
Zeev Suraski
2ab30d7133
Allow foo::$bar()
2003-10-09 13:44:44 +00:00
Moriyoshi Koizumi
ddd49b34c8
Remove redundant '\n'
2003-09-30 00:32:41 +00:00
Marcus Boerger
909bd62a43
Show name of missing function as typed
2003-09-17 11:06:11 +00:00
Marcus Boerger
46b8801b35
Go with studlyCaps in error messages/backtrace/reflection output
2003-09-17 10:14:12 +00:00
Marcus Boerger
9d0506ec54
Fix property inheritance where a derived class inherits a public property
...
and owns it as an implicit public property already (noticed by Brad).
2003-09-08 23:25:57 +00:00
Marcus Boerger
be8287e55c
Partly revert and reintroduce hash table entries for the ctor.
...
# Obviously not the brightest idea i had today.
2003-09-03 21:21:18 +00:00
Marcus Boerger
5569d7fae9
Nuke unused variable, too
2003-09-03 20:28:13 +00:00
Marcus Boerger
61b96d1fe2
- Inheritance applies to __clone() too.
...
- No need to add additional functions for the constructor.
The handler uses the pointer as intended and doesn't look the the name.
2003-09-03 20:26:01 +00:00
Marcus Boerger
91ff8d67e7
Cannot turn a static property into a non static one and vice versa
2003-09-03 19:28:46 +00:00
Marcus Boerger
7bbbd5035d
Fix handling of static properties initialized to arrays
2003-09-03 18:01:22 +00:00
Marcus Boerger
1d21d48e8a
Add missing error messages when violating static property inheritance rules.
2003-09-03 16:34:35 +00:00
Marcus Boerger
1b39a5aa2c
Fix static properties.
...
#
# There's only an errormessage missing which i'll wommit as soon as i find out
# how to do it best. But besides that damn message everything works now and all
# inheritance rules apply.
#
2003-09-03 16:13:40 +00:00
Marcus Boerger
1d3d396fea
Allow redeclareing a protected property as public.
...
#
# The only known thing left at this moment is that the protected static members
# of a base class is different then the redeclared public property. I tried
# to remove both new and old static properties in the derived class and copy
# the base property with the new name. But for reasons i have to check later
# that didn't result in the expected behavior. Anyway we would need a warning
# if someone tries to change the value of a static property in a derived class.
#
2003-09-03 10:58:55 +00:00
Zeev Suraski
93f0ee5fda
Revert bogus patch
...
One must *never* use E_CORE_* error levels!
2003-09-03 08:39:43 +00:00
Marcus Boerger
d1b74000ad
Fix error messages
2003-09-02 23:12:37 +00:00
Marcus Boerger
469b746b4d
Fix error level
2003-09-02 13:28:34 +00:00
Marcus Boerger
0f3374615b
Currently we cannot support static ctor/dtor
2003-09-02 13:26:25 +00:00
Zeev Suraski
aaa1cdca31
Fix a problem in implicit public properties and inheritance
2003-08-29 08:51:43 +00:00
Sascha Schumann
2e36578cfd
Add format attribute to a number of functions
...
Kill a few warnings
2003-08-28 16:41:20 +00:00
Marcus Boerger
19ec7a09fc
- Provide appropriate way to destroy internal zval's.
...
- Allow internal zval's of type string and disallow complex types.
- Define the default string for extensions at class level instead of ctor.
2003-08-24 17:32:47 +00:00
Zeev Suraski
a9107e2be1
Use pemalloc()
2003-08-24 16:17:45 +00:00
Marcus Boerger
baaa4c903d
Internal classes can now have default properties.
2003-08-23 19:37:39 +00:00
Marcus Boerger
fbda310a41
- Flag ctor/dtor methods
...
- Use this to prevent memleaks when an exception gets thrown in ctors.
# I added the dtor flags for consistency, atm a compareable check in
# isn't necessary for destruction. But anyway i'll use this for the
# Relection API too.
2003-08-23 15:38:58 +00:00
Zeev Suraski
b5786d4220
ws
2003-08-18 20:43:09 +00:00
Marcus Boerger
9c68f33b51
Implement a TBD: JMP to the end of foreach
2003-08-17 12:17:34 +00:00
Marcus Boerger
f2d4e4ca48
WS
2003-08-17 12:16:10 +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
Marcus Boerger
2bbf4ad261
Bugfix #24637 __destruct not called
2003-08-10 23:59:35 +00:00
Moriyoshi Koizumi
fe489dcb4f
Fix segfault when a referenced parameter is specified with typehint.
...
Result of the node will never be used because verify_instanceof handler has
been eliminated.
2003-08-09 19:29:38 +00:00
Stanislav Malyshev
b6ff804cfe
fix leaks: bug #24831
2003-08-04 10:40:05 +00:00
Zeev Suraski
1959133fb3
Simplify code using XOR
2003-08-04 07:53:09 +00:00
Marcus Boerger
538aad24e3
Fix test and add missing initialization
2003-08-03 22:03:52 +00:00
Zeev Suraski
f8bbafd604
ntroduce infrastructure for supplying information about arguments,
...
including:
- Whether or not to pass by ref (replaces the old arg_types, with arg_info)
- Argument name (for future use, maybe introspection)
- Class/Interface name (for type hints)
- If a class/interface name is available, whether to allow a null instance
Both user and builtin functions share the same data structures.
To declare a builtin function that expects its first arg to be an instance
of class 'Person', its second argument as a regular arg, and its third by
reference, use:
ZEND_BEGIN_ARG_INFO(my_func_arg_info, 0)
ZEND_ARG_OBJ_INFO(0, someone, Person, 1)
ZEND_ARG_PASS_INFO(0)
ZEND_ARG_PASS_INFO(1)
ZEND_END_ARG_INFO();
and use my_func_arg_info as the arg_info parameter to the ZEND_FE() family
of macros.
The first arg to each ZEND_ARG_*() macro is whether or not to pass by ref.
The boolean arg to ZEND_BEGIN_ARG_INFO() tells the engine whether to treat
the arguments for which there's no explicit information as pass by reference
or not.
The boolean argument to ZEND_ARG_OBJ_INFO() (4th arg) is whether or not to allownull values.
2003-08-03 17:40:44 +00:00
Zeev Suraski
9d7122fb53
Generalize fetch_class
2003-08-03 08:21:08 +00:00
Zeev Suraski
accd6b623b
Finish the array overloading patch
2003-07-31 09:06:11 +00:00
Zeev Suraski
68fa4e50f8
Get rid of an opcode
2003-07-30 17:49:27 +00:00
Zeev Suraski
f41f62c2ff
Support overloading of $foo["bar"] += "baz"
2003-07-30 17:40:54 +00:00
Zeev Suraski
c0b46739ca
Improve array overloading - support unset($foo["bar"])
2003-07-30 17:12:06 +00:00
Stanislav Malyshev
57b12285de
fix compare
2003-07-27 16:43:05 +00:00
Stanislav Malyshev
7b1bbc85bc
use zend_binary_strncasecmp
2003-07-27 16:39:35 +00:00
Stanislav Malyshev
9fa2d52310
make clone and throw coexist peacefully
2003-07-27 13:20:31 +00:00
Stanislav Malyshev
5724c7a66c
fix leaks with class constants (bug #24699 )
2003-07-27 12:03:54 +00:00
Stanislav Malyshev
78f8ca6e55
make __clone call case insensitive, just as other calls are
2003-07-27 11:42:21 +00:00
Zeev Suraski
55097d1dcf
Fix another HANDLE_NUMERIC bug. Looks like you opened Pandora's box, Sterling ;)
2003-07-24 13:14:57 +00:00
Zeev Suraski
7928e763d2
Remove useless code
2003-07-24 12:51:07 +00:00
Zeev Suraski
03b6af07eb
Support references in foreach()
...
Syntax:
foreach ($arr as &$val)
foreach ($arr as $key => &$val)
2003-07-24 12:38:33 +00:00
Stanislav Malyshev
237116aa27
Remove namespace leftovers
2003-07-23 08:58:46 +00:00
Zeev Suraski
e10dbc607c
Fix bug in the verification of interface-function implementation
2003-07-16 09:13:47 +00:00
Zeev Suraski
3a898f6d4e
More cleanup for assign-op handling of objects
2003-07-16 08:57:08 +00:00
Zeev Suraski
134338522f
Rework zend_do_declare_property and related code into one code base
2003-07-07 16:22:56 +00:00
Zeev Suraski
938c0fbc19
Initial support for overloading of array syntax for objects (very initial)
2003-07-07 09:00:36 +00:00
Marcus Boerger
d7e14ad8a3
Allow final private methods
...
#
# Declaring a method private and final would only be an error for an abstract
# class. But at the moment the method is defined and it's modifiers are checked
# we do not know whether or not we have an abstract class. It could already be
# abstract but it also become abstract later.
#
# Since i made the mistake in first place i remove the check now.
#
# Providing the correct test would slow down the compiler becuase we'd have to
# iterate through all methods on all abstract classes and check for this. I
# guess we can live without. Or does anybody wants this to be implemented ?
2003-07-03 16:45:37 +00:00
Stanislav Malyshev
8f0234160a
enable Classname() constructor to be called via parent::__constructor()
2003-07-03 12:03:11 +00:00
Andi Gutmans
02c7aacf83
- Nuke CG(in_clone_method)
2003-07-02 16:52:07 +00:00
Sterling Hughes
778d8c8bf1
nuke "main" as a reserved keyword
2003-06-30 20:24:26 +00:00
Andi Gutmans
288dacca0c
- ZE coding style requires if ( instead of if(
2003-06-30 20:22:35 +00:00
Marcus Boerger
60c7abac61
Add final classes
2003-06-21 21:56:06 +00:00
Stanislav Malyshev
8cd9792375
Fix bug #23384 - static class::constant constants should now
...
work in static & array expressions.
2003-06-15 13:58:50 +00:00
James Cox
f68c7ff249
updating license information in the headers.
2003-06-10 20:04:29 +00:00
Zeev Suraski
8d2a4e04ae
Fix bogus implicit declarations of properties (squash bug #23671 )
2003-06-09 13:51:53 +00:00
Zeev Suraski
d329ce93f2
Nicer handling of protected/private members in print_r()
2003-06-08 18:53:58 +00:00
Stanislav Malyshev
f7f5a5ea6b
MEGA-patch: namespaces are R.I.P.
2003-06-02 12:13:11 +00:00
Sterling Hughes
5bb29cfaeb
revert the function call caching patch until a new solution is decided
...
upon.
2003-05-31 18:31:28 +00:00
Marcus Boerger
21d32c2430
Fix ~ operator in class constants.
2003-05-29 19:27:11 +00:00
Marcus Boerger
472cc5b9f3
Faster interface inheritance & faster inheritance checks
2003-05-29 19:00:40 +00:00
Wez Furlong
15fd642525
Fix Bug #23285 (Potential Stack Overflow in zendlex).
2003-05-29 09:01:55 +00:00
Sterling Hughes
88b2f89eee
Cache function call lookups with loops (store in a temporary variable on the
...
result opline).
Assuming lazy concensus on message that GeorgeS sent to the list last week
2003-05-28 20:42:40 +00:00
Stanislav Malyshev
462eff3497
fix __clone
2003-05-19 17:12:56 +00:00
Marcus Boerger
d3693d9214
Inheritance fix
...
# here we go again, sorry for the mess and thanks to edin for reverting it
2003-05-08 15:04:43 +00:00
Edin Kadribasic
7a0efe828a
Reverting Marcus' incomplete patch which broke the build.
2003-05-07 22:19:43 +00:00
Marcus Boerger
764eaa5b8b
Inheritance fixes
2003-05-07 00:54:38 +00:00
Marcus Boerger
9d251cde97
Don't inherit twice what is needed only once
2003-05-04 18:56:35 +00:00
Sterling Hughes
b4262dcf17
Add check for final properties
2003-04-20 14:52:40 +00:00
Sebastian Bergmann
dccdb2f549
Fix warnings.
2003-04-11 17:30:42 +00:00
Sterling Hughes
c013f78274
satisfy andi's switch fetish ;-)
2003-04-10 20:08:02 +00:00
Sebastian Bergmann
974f406eda
Fix ZTS build. Fix warning.
2003-04-10 17:02:31 +00:00
Sterling Hughes
0191ba5de1
allow expressions within constants, so the following is possible
...
class foo {
const a = 1<<0;
const b = 1<<1;
const c = a | b;
}
this makes const a compile-time expression. all other operators are
unaffected.
2003-04-10 15:43:47 +00:00
Andrei Zmievski
91eff553e3
Initialize all relevant zend_class_entry fields to avoid accidental
...
crashes.
2003-04-03 14:44:41 +00:00
Andrei Zmievski
bdd3b6042c
Implement a different way to catch documentation comments.
2003-04-02 16:51:49 +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
62f9eb8006
Split ZEND_NAMESPACE into user and internal namespaces. Hope this is
...
okay with engine folks.
2003-04-01 19:37:04 +00:00
Andrei Zmievski
5657b83691
Multi-purpose patch:
...
- The fields of zend_namespace were not completely initialized which
led to a variety of problems.
- The occurrence of class/interface/namespace definition is now
captured.
- Functions/classes/interfaces/namespaces can be preceded by doc
comments which are stored for use by extensions.
2003-03-31 20:42:01 +00:00
Zeev Suraski
96231c3ab5
Add missing initialization
2003-03-29 19:20:35 +00:00
Zeev Suraski
20860feef1
Fix crash
2003-03-29 11:27:17 +00:00
Zeev Suraski
5097be302e
Initial support for enforcing prototype of abstract/interface method implementations
2003-03-29 11:19:38 +00:00
Ilia Alshanetsky
018d851129
Fixed bug #22900 (declaration of namespaces with same name results in leaks).
2003-03-26 17:06:08 +00:00
Andi Gutmans
85d2c35bfa
- Temporarily fix problem with inheriting from an internal class. This might
...
- need some rework in the future (thanks to Marcus)
2003-03-25 20:36:26 +00:00
Zeev Suraski
0aef71ff89
Another fix for implicit public, perhaps it was not such a good idea :I
2003-03-23 08:14:41 +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
Zeev Suraski
40326f6adf
- Fix situation where a derived class declares a public (or implicit public)
...
with the same name as a private in the parent
- Optimize 'static binding' of private properties a bit
2003-03-18 16:30:23 +00:00
Zeev Suraski
fa7dc03edb
Fix a crash bug in the implicit public declaration
2003-03-12 09:38:19 +00:00
Zeev Suraski
3e7cf8e15e
Clean redundant code
2003-03-10 07:20:43 +00:00
foobar
f8fc50ed6d
Fixed some leaks. Patch by Moriyoshi
2003-03-10 03:04:02 +00:00
Zeev Suraski
0eae231254
Fix handling of ::foo
2003-03-09 22:17:15 +00:00
Zeev Suraski
3012bdc332
Cleanup
2003-03-09 22:02:37 +00:00
Zeev Suraski
8bc88d8df4
Fix parsing rules of namespaces/classes
2003-03-09 20:53:57 +00:00
Zeev Suraski
8e1917bdbe
Fix :: handling
2003-03-09 17:06:52 +00:00
Zeev Suraski
805f98065d
Fix warnings
2003-03-06 23:45:50 +00:00
Zeev Suraski
0338111950
Require abstract classes to be explicitly declared 'abstract', in order to
...
avoid making developers traverse the entire class/interface hierarchy
before they can figure out whether a class is instantiable
(ok, so it makes sense :)
2003-03-06 22:53:23 +00:00
Zeev Suraski
44347cf64b
Change opcode name
2003-03-06 14:42:36 +00:00
Zeev Suraski
ff76511a08
Add class type hints
2003-03-06 14:31:17 +00:00
Zeev Suraski
812d91d08c
Fix auto globals
2003-03-05 21:36:30 +00:00
Zeev Suraski
6ad2420d2d
Implement $obj::static_func()
2003-03-05 13:25:33 +00:00
Zeev Suraski
26dd8492ed
Add support for interfaces
2003-03-05 11:14:44 +00:00
Zeev Suraski
d5ada68654
Remove legacy code
2003-03-04 13:52:03 +00:00
Zeev Suraski
e0c3e2cf93
Remove redundant code
2003-03-04 13:36:16 +00:00
Zeev Suraski
98b990e336
Improve infrastructure
2003-03-02 13:33:31 +00:00
Zeev Suraski
f7b7800479
Add infrastructure for JIT initialization of auto globals
2003-03-02 10:04:53 +00:00
Zeev Suraski
805637b06d
Fix mem leak
2003-03-01 19:08:41 +00:00
Andi Gutmans
1a7c0d52dc
- Make __construct() have higher priority than class name functions
...
- for constructors.
- Fix problem with the engine allowing final/abstract for the same method.
- Both patches are by Marcus Börger.
2003-03-01 14:57:49 +00:00
Zeev Suraski
5793784c93
Get the bits right - final/private fix
2003-02-25 10:03:26 +00:00
Stanislav Malyshev
3cf20f86db
fix exception handling
2003-02-24 13:35:47 +00:00
Zeev Suraski
535aa63293
Add 'final'
2003-02-24 12:05:58 +00:00
Zeev Suraski
731a55ad52
Move abstract inheritance logic to the right spot
2003-02-23 13:58:48 +00:00
Zeev Suraski
bb956372a5
Fixed abstract handling in inheritence
2003-02-23 12:51:40 +00:00
Stanislav Malyshev
e645f20d07
Allow namespaces to have a number of parts. I.e., now you can do:
...
namespace foo {
function abc() {}
}
...
namespace foo {
functio def() {}
}
2003-02-20 19:01:53 +00:00
Zeev Suraski
955636af69
Avoid using a C++ reserved word
2003-02-18 17:18:28 +00:00
Stanislav Malyshev
3e45b23799
add support for ::foo syntax meaning "global one"
2003-02-16 13:27:33 +00:00
Stanislav Malyshev
c9b2ec7be7
remove debug prints
2003-02-16 12:04:41 +00:00
Sebastian Bergmann
6d300baf84
ZTS fixes
2003-02-16 11:34:49 +00:00
Stanislav Malyshev
a4c3b2ce80
Namespace patch. Big changes:
...
1. Nested classes are gone.
2. New syntax for namespaces:
namespace foo {
class X { ... }
function bar { ... }
var x = 1;
const ZZ = 2;
}
3. Namespaced symbol access: $x = new foo::X; - etc.
For now, namespaces are case insensitive, just like classes.
Also, there can be no global class and namespace with the same name
(to avoid ambiguities in :: resolution).
2003-02-16 11:12:43 +00:00
Zeev Suraski
3c2a1255cd
Fix declaration of class members that don't have an explicit access modifier
2003-02-12 16:28:34 +00:00
Zeev Suraski
beaf84ea17
Fix require() handling - that's an old bug!
2003-02-11 15:41:46 +00:00
Zeev Suraski
2814504143
Improve parser handling of 'abstract'
2003-02-11 09:48:37 +00:00
Zeev Suraski
f196e11f42
Fix zend_initialize_class_data()
2003-02-10 16:46:05 +00:00
Zeev Suraski
c17c7a2bfa
Centralize class initialization
2003-02-10 16:11:24 +00:00
Zeev Suraski
6317e26576
- Treat $this->foo inside class X as an implicit 'public $foo' if X::$foo
...
is not explicitly declared
- Forbid multiple declaration of the same variable
2003-02-10 12:46:58 +00:00
Zeev Suraski
5e12de9510
Add missing destructors
2003-02-10 11:03:22 +00:00