Commit Graph

528 Commits

Author SHA1 Message Date
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