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
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
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
Sebastian Bergmann
9726e74da5
Fix prototype.
2002-11-21 14:16:57 +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
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
6f9bfe5cca
- Shift around zend_op members
2002-11-05 21:35:05 +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
Stanislav Malyshev
3a9eeea213
avoid using 'class' in exported functions - it annoys c++
2002-11-05 17:21:23 +00:00
Andi Gutmans
80109314b9
- Improve performance of part of the jmps. More to follow.
2002-10-24 18:04:12 +00:00
Andi Gutmans
d12679a64d
- Improve overall engine performance
2002-10-22 19:31:53 +00:00
Andi Gutmans
13274801e4
- Fix compile warning.
2002-10-19 20:57:15 +00:00
Andi Gutmans
536d4d8aab
- Improve opcode dispatching
2002-10-19 09:45:51 +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
Andi Gutmans
f78fa50423
- Megapatch to try and support inheritance from sub-classes. Things might
...
- be *very* buggy now so don't get too upset if that happens.
- I still need to improve some stuff but it's a good step (hopefully).
2002-09-24 19:05:53 +00:00
Stanislav Malyshev
d8651c82cd
Support for __get, __set and __call in classes.
...
This should work as follows: if class hasn't member with given name,
__get/__set is called. If class has no method with given name, __call is called.
__get/__set are not recursive, __call can be.
2002-09-04 09:07:58 +00:00
Jason Greene
b806a8e247
MFZE1 (use token instead of global for opcode counting)
2002-08-14 01:40:59 +00:00
Andi Gutmans
52406cb37c
- Make new 'is' operator work with classes only and return false when
...
- the object isn't of the said class or the value isn't an object.
2002-08-08 16:32:34 +00:00
Andrei Zmievski
82c72f2799
@- Adding 'is' operator that can be used to check the type of a variable,
...
@ or its class. (Andrei)
2002-07-30 04:07:15 +00:00
Andi Gutmans
41e3f4f0c3
- Fix problem with debug_backtrace() reported by Stig. We weren't reporting
...
- global function information because it wasn't available. We have to do
- an additional assignment per-function call so that it'll be available.
- Also don't define the global scope as function name _main_ but leave it
- empty so that frameworks like Pear can decide what they want to do.
2002-07-26 10:38:25 +00:00
Andi Gutmans
7b68f5108a
- Nuke delete(). It was a big mistake to introduce it and I finally
...
- understand why Java didn't do so.
- If you still want to control destruction of your object then either make
- sure you kill all references or create a destruction method which you
- call yourself.
2002-07-14 19:23:18 +00:00
Andi Gutmans
b66c89c47a
- More debug backtrace work. It still doesn't work very well...
2002-05-07 18:42:13 +00:00
Andi Gutmans
7e5ec2d761
Initial support for built-in backtracing.
...
There are still a few problems such as includes and calling other functions
from internal functions which aren't seen (will have to think if and how to
fix this).
Also the main scripts filename isn't available. Need to think about that.
2002-05-02 17:20:48 +00:00
Harald Radi
51e797f1e3
some type cleanup work
2002-04-23 18:06:54 +00:00
Andi Gutmans
0ce019f715
- Fix issues with $this when using it by itself without indirection such as
...
- $this->foo.
2002-03-15 15:09:46 +00:00
Andi Gutmans
c8c629b3fc
- Fix bug introduced with latest class hash table change.
2002-03-12 18:53:27 +00:00
Stanislav Malyshev
92dd5e611b
- make class tables contain class_entry *, not class_entry
...
- fix isset($this)
2002-03-12 10:08:47 +00:00
Stanislav Malyshev
04ed2b520f
New stuff for objects API:
...
- Better assignment handling
- More flexible operations with zval-containing objects
2002-03-10 13:42:37 +00:00
Andi Gutmans
b90d80b588
- Initial patch to support importing from class scopes (for Stig).
...
- It isn't complete yet but I want to work on it from another machine. It
- shouldn't break anything else so just don't try and use it.
- The following is a teaser of something that already works:
<?php
class MyClass
{
function hello()
{
print "Hello, World\n";
}
class MyClass2
{
function hello()
{
print "Hello, World in MyClass2\n";
}
}
}
import function hello, class MyClass2 from MyClass;
MyClass2::hello();
hello();
?>
2002-03-02 20:38:52 +00:00
Andi Gutmans
90bd4539c7
- Remove use of C++ reserved words namespace/this
2002-03-01 14:27:26 +00:00
Andi Gutmans
d1eea3de9c
- Fix bug in nested try/catch's
...
- Infrastructure for implementing imports of methods.
2002-03-01 14:04:51 +00:00
Andi Gutmans
21b04ff2a6
@ Allow a series of consecutive catch() statements (Andi, Zend Engine)
...
<?php
class MyException1 {
}
class MyException2 {
}
try {
throw new MyException2();
} catch (MyException1 $m) {
print "Caught MyException1";
} catch (MyException2 $m) {
print "Caught MyException2";
}
2002-02-13 19:26:07 +00:00
Sebastian Bergmann
1fd542fd38
Export lex_scan(). Both the PHPDoc and tokenizer extension need this. I hope this is okay with Z&A.
2002-02-10 12:54:02 +00:00
Andi Gutmans
e366f5dbd8
- Fix problem with the objects_destructor called during shutdown. It was
...
- freeing objects from id 0 instead of id 1. id 0 is not used.
- Change isset/empty opcodes to support static members and the new way of
- doing $this->foobar. Also the opcodes operate now on the hash table
- combined with the variable names so that they can be overloaded by the
- soon to be added overloading patch.
2002-02-04 19:29:56 +00:00
Andi Gutmans
2131b019c7
- Improve performance of functions that use $GLOBALS[]
...
- Please check this and make sure it doesn't break anything.
2002-01-20 20:42:15 +00:00
Andi Gutmans
f1e8815c26
- Change exception handling to use the Java-like catch(MyException $exception)
...
- semantics. Example:
<?php
class MyException {
function __construct($exception)
{
$this->exception = $exception;
}
function Display()
{
print "MyException: $this->exception\n";
}
}
class MyExceptionFoo extends MyException {
function __construct($exception)
{
$this->exception = $exception;
}
function Display()
{
print "MyException: $this->exception\n";
}
}
try {
throw new MyExceptionFoo("Hello");
} catch (MyException $exception) {
$exception->Display();
}
?>
2002-01-13 20:21:55 +00:00
Sebastian Bergmann
62dc854bb0
Happy New Year.
2002-01-06 15:21:36 +00:00
Andi Gutmans
e56fb1639b
- Allow passing of $this as function arguments.
...
- Fix a bug which I introduced a couple of months ago
2002-01-05 19:59:09 +00:00
Andi Gutmans
a4248dd584
- Significantly improve the performance of method calls and $this->member
...
- lookups.
2002-01-05 15:18:30 +00:00
Andi Gutmans
6203a250f7
- Separate other kinds of function calls too.
...
- Significantly improve performance of function calls by moving lowercasing
- the function name to compile-time when possible.
2002-01-04 08:05:21 +00:00
Andi Gutmans
0ab9d11225
- Start splitting up different kinds of function calls into different
...
- opcodes.
2002-01-04 06:44:19 +00:00
Andi Gutmans
ae1a702501
- Fix some case insensitivity stuff in respect to classes
2001-12-28 16:36:04 +00:00
Andi Gutmans
b3fd2faac0
- Support parent:: again
2001-12-27 13:12:45 +00:00
Andi Gutmans
2ce4b47657
- Initial support for _clone()
2001-12-26 17:49:22 +00:00
Andi Gutmans
ac7ed464b5
- Start adding parsed variable checks.
2001-12-16 19:45:49 +00:00
Andi Gutmans
880e7d8ce7
- Framework for knowing what kind of variable we just parsed.
...
- This will be used in compile-time error checking which couldn't be done
- at the level of the grammar.
2001-12-16 19:18:19 +00:00
Andi Gutmans
f4b832d277
- Fix crash bug in startup code.
...
- Start work on being able to reference global and local scope
2001-12-13 16:55:04 +00:00
Andi Gutmans
74efc41fc3
- Make classes have scope and function/constant lookups default to the class
2001-12-12 17:38:37 +00:00