Commit Graph

361 Commits

Author SHA1 Message Date
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
Zeev Suraski
b39b33c4c5 Fix the 2nd buglet in the error message :) 2003-02-06 00:39:58 +00:00
Zeev Suraski
17439aa9c4 Rework static class properties - now supports access restrictions 2003-02-05 13:35:52 +00:00
Zeev Suraski
ef77e582f5 Fix buglet in error message 2003-02-05 07:46:13 +00:00
Zeev Suraski
471947b188 Reimplement PPP properties 2003-02-04 12:12:34 +00:00
Andi Gutmans
87f4472afb - Fix warning 2003-02-02 05:20:31 +00:00
foobar
333406bdc2 - Added some missing CVS $Id$ tags, headers and footers. 2003-02-01 01:49:15 +00:00
Stanislav Malyshev
123d8f782f fix memory leak 2003-01-29 14:25:53 +00:00
Zeev Suraski
49fd225238 Fix a ticks related crash 2003-01-28 11:34:24 +00:00
Stanislav Malyshev
3a4ace13b4 Replace MAKE_VAR opcode with special 'data' opcode
This opcode is not executeable but only holds data for opcodes
that need more than two arguments (presently only ASSIGN_OBJ and the ilk but
in the future also ASSIGN_DIM)
2003-01-27 15:13:01 +00:00
Stanislav Malyshev
dce8267f35 Restore for now old statics behaviour (so that indirect $$var references would work again). Comprehensive fix will follow later. 2003-01-19 17:25:39 +00:00
Andi Gutmans
e5afca38b6 - Revert int -> unsigned int change for str.len 2003-01-15 20:35:06 +00:00
Andi Gutmans
c073b76aac - Change "is" to "instanceof" as it explains better what the operator means.
- "is_a" was also appropriate but ugly.
2003-01-14 21:29:23 +00:00
Stanislav Malyshev
67c50ee22a fix warning 2003-01-14 12:27:07 +00:00
Stanislav Malyshev
33b67ab868 fix inheritance 2003-01-12 18:57:18 +00:00
Stanislav Malyshev
d48ffd97d6 RIP handle_* functions. ZE2 will use __ handlers instead.
# Yes, I know this will break some things. I will fix those I can find shortly.
2003-01-12 17:16:07 +00:00
Zeev Suraski
424e98f4e2 Implemented compatibility mode
To enable - zend2.implicit_clone = on in php.ini or using ini_set()
2003-01-12 12:39:06 +00:00
Zeev Suraski
66d30a4966 Found some more occurences of that elusive bug... 2003-01-09 16:16:57 +00:00
Zeev Suraski
ef6a44d15c Fix one lousy, annoying lurking bug (memory corruption)
Sebastian - try coWiki again please...
2003-01-09 16:10:33 +00:00
Zeev Suraski
cf05f34c66 MFZE1 - lineno fix 2003-01-05 16:09:59 +00:00
Zeev Suraski
77208ec4d6 Fix incorrect linkage of access-levels, when using private methods 2003-01-02 13:58:08 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Andrei Zmievski
4121057117 do_inherit_method_check() is supposed to return 0 or 1, not SUCCESS or
FAILURE.
2002-12-26 16:27:59 +00:00
Zeev Suraski
66aba3c568 Fix check to allow for static+access level modifiers 2002-12-10 09:04:12 +00:00
Zeev Suraski
32b100e6cb - Allow variables to have both 'static' modifier and an access level.
NOTE:  This only works at the syntax level right now (parser).  It
         doesn't actually work as of yet - all statics are considered
         public for now
- Prevent users from putting more restrictions on methods in derived classes
  (i.e., you cannot make a public method private in a derived class, etc.)
2002-12-09 12:10:17 +00:00
Zeev Suraski
8f491470a1 Remove comment 2002-12-08 14:10:58 +00:00
Zeev Suraski
dc5c790a49 Treat the absence of an access type just as if 'public' was supplied 2002-12-08 14:09:43 +00:00
Zeev Suraski
68aa19445b Simplify/fix inheritance checks 2002-12-07 21:46:12 +00:00
Andi Gutmans
1d1a796b58 - Dissallow using parent, self and main as class names 2002-12-07 15:51:25 +00:00
Zeev Suraski
e062dffe6c - Implement public/protected/private methods.
- Prevent instantiation of classes with abstract methods.
Based in part on Marcus's patch.
2002-12-06 17:09:44 +00:00
Andi Gutmans
671fff2fde h WHitespace 2002-11-30 11:20:25 +00:00
Andi Gutmans
6aa90a75bd - FN_IS_STATIC -> FN_STATIC 2002-11-24 20:32:49 +00:00
Andi Gutmans
01e853c2ce - My personal cleanups 2002-11-23 20:46:39 +00:00
Andi Gutmans
e8214a3384 - Commit Marcus' cleanup of abstract and static inheritance and improve
- error messages
2002-11-23 20:44:12 +00:00
Andi Gutmans
227f7838d6 - Fix build (thanks Marcus)
- Implement abstract methods, syntax:
-    abstract function foo($vars);
- I don't see any reason why modifiers such as static/public need to be
- used with abstract. PHP is weakly typed and there would be no meaning to
- this anyway. People who want a strictly typed compiled language are
- looking in the wrong place.
2002-11-20 18:00:23 +00:00
Andi Gutmans
e19165b356 - MFZE1 2002-11-10 22:02:28 +00:00
Stanislav Malyshev
830c2e0df6 fix statics - make it behave like $this (fetch type "static")
Side effect: indirect references to statics won't work.
2002-11-10 17:50:27 +00:00
Andi Gutmans
c497868005 - Add support for static methods. Basically methods which are defined as
- static don't have $this. That's the whole difference.
2002-11-05 19:37:31 +00:00
Andi Gutmans
f7f9721bdb - Change the automatically created variable $clone in __clone() to
- $that as discussed at the PHP Conference. If there are any objections
- alternative names please let me know. The reason for changing it from
- $clone is because $clone sounds as if it's the newly cloned object and
- not the old one.
2002-11-05 18:16:11 +00:00
Stanislav Malyshev
3a9eeea213 avoid using 'class' in exported functions - it annoys c++ 2002-11-05 17:21:23 +00:00
Ilia Alshanetsky
e849aa9d9b Silence compiler warnings. 2002-11-04 17:35:41 +00:00
Andi Gutmans
1eb04a850e - This might improve performance. Commiting it so that I can check it on
- Linux
2002-10-23 20:40:07 +00:00
Stanislav Malyshev
2461c9403b Fix private handling 2002-10-20 17:46:16 +00:00
Andi Gutmans
cf36abb2eb - Change opcode dispatch mechanism to use a function per opcode and use
- a lookup table using the opcode # to call the correct function.
- Still have lots of tuning to do.
2002-10-18 21:19:27 +00:00
Stanislav Malyshev
c42ec35331 Fix class static members: now the following code works:
<?php

class Foo {
         static $c = "Parent";
}

class Child extends Foo {
}

Foo::$c = "Hello";

var_dump(Child::$c);
?>
and returns "Hello" (class statics are not copied anymore, but looked up in
runtime)
2002-10-16 18:29:41 +00:00
Stanislav Malyshev
349b3a096a Fix and generalize $this handling.
ZEND_FETCH_FROM_THIS is removed, IS_UNUSED type on class variables will be
used instead as the sign that it's a fetch from $this
2002-10-16 18:06:36 +00:00
Ilia Alshanetsky
d3617c51b8 MFZE1 zend_str_tolower issue. 2002-10-09 14:21:40 +00:00