Commit Graph

123 Commits

Author SHA1 Message Date
Andrei Zmievski
bdd3b6042c Implement a different way to catch documentation comments. 2003-04-02 16:51:49 +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
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
26dd8492ed Add support for interfaces 2003-03-05 11:14:44 +00:00
Wez Furlong
e52aac940f Implement simple stream support in the ZE scanners. 2003-02-18 09:37:54 +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
fce275eb41 Improve PPP handling of properties 2003-02-07 10:05:36 +00:00
Zeev Suraski
471947b188 Reimplement PPP properties 2003-02-04 12:12:34 +00:00
foobar
333406bdc2 - Added some missing CVS $Id$ tags, headers and footers. 2003-02-01 01:49:15 +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
cf05f34c66 MFZE1 - lineno fix 2003-01-05 16:09:59 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +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
d12679a64d - Improve overall engine performance 2002-10-22 19:31:53 +00:00
Ilia Alshanetsky
fac8eaff1a MFZE1 2002-10-14 23:41:32 +00:00
Ilia Alshanetsky
e842ef9f4b MFZE1 (floats & locale issue) 2002-10-12 21:15:35 +00:00
Andi Gutmans
7cba0254e7 - Allow access to private/protected variables of $clone inside the __clone()
- method
2002-10-07 21:20:23 +00:00
Andi Gutmans
8831b9cfd0 - MFZE1. 2002-09-23 17:20:59 +00:00
Stig Bakken
04788f9503 @- Added set_exception_handler() function for registering a global,
@  catch-all exception handling function (Stig)
- Added set_exception_handler() function for registering a global,
  catch-all exception handling function (Stig)
2002-08-16 00:41:37 +00:00
Zeev Suraski
0bb780b384 MFZE1 2002-08-15 00:25:27 +00:00
Jason Greene
b806a8e247 MFZE1 (use token instead of global for opcode counting) 2002-08-14 01:40:59 +00:00
Jason Greene
b0cf6c3112 MFZE1 global declare 2002-07-30 22:19:50 +00:00
Andi Gutmans
e2f57d0fcc - MFZE1 2002-06-22 14:37:49 +00:00
Andi Gutmans
9e3517161e - This was also supposed to be part of the previous ZEND_MM commit :) 2002-06-19 16:53:49 +00:00
Andi Gutmans
380c082e32 - Commit an initial version of a home made memory manager.
- It's just for seeing if this would be an advantage to PHP in MT
- environments. If this is to become production material there is still
- a long way to go.
2002-06-16 17:17:47 +00:00
Stanislav Malyshev
f75f3cff82 Generalize object storage and reference bookkeeping 2002-05-31 12:09:19 +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
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
Stanislav Malyshev
6608f07322 Mega-commit: Enter the new object model
Note: only standard Zend objects are working now. This is definitely going to
break custom objects like COM, Java, etc. - this will be fixed later.
Also, this may break other things that access objects' internals directly.
2002-02-07 14:08:43 +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
a4248dd584 - Significantly improve the performance of method calls and $this->member
- lookups.
2002-01-05 15:18:30 +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
ce98c73f82 - Infrastructure changes for allowing to access the global scope from
- within a class scope.
- Fix the Zend.dsp project a bit. It seems someone pretty much killed it
- when commiting their own personal configuration. Please be careful in
- future.
2001-12-12 20:45:38 +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
Sebastian Bergmann
d863d52a5d Update headers. 2001-12-11 15:16:21 +00:00
Andi Gutmans
42486196ad - Initial work on changing namespace scope. Only methods & variables
- right now.
<?
	$hey = "Global hey\n";

	class foo {
		static $hey = "Namespace hey\n";
		function bar()
		{
			print "in foo::bar()\n";
		}
	}
	function bar()
	{
		print "in bar()\n";
	}

	bar();
	namespace foo;
	bar();
	namespace;
	bar();
	namespace foo;
	$bar_indirect = "bar";
	$bar_indirect();

	namespace;
	print $hey;
	namespace foo;
	print $hey;
	$hey = "Namespace hey #2\n";
	namespace;
	print $hey;
	$hey = "Global hey #2\n";
	namespace foo;
	print $hey;
?>
2001-12-06 17:47:04 +00:00
Andi Gutmans
fe94f59427 - Nuke the namespace work I did. It'll be redone differently. 2001-12-06 17:23:08 +00:00
Andi Gutmans
26578c386d - Initial support for nested class definitions 2001-10-29 17:19:02 +00:00
Zeev Suraski
aecd5b89ee MFZE1 2001-10-23 01:23:36 +00:00
Andi Gutmans
2eabb14dc7 - Merge the NAMESPACES_BRANCH. It wasn't a good idea to have a branch when
- the whole CVS tree is work in progress
2001-09-30 17:29:55 +00:00
Zeev Suraski
e42ab2c95f MFZE1 2001-09-22 14:03:27 +00:00
Zeev Suraski
17352812a3 MFZE1 2001-09-22 00:09:24 +00:00
Zeev Suraski
483fc4c73a MFZE1 2001-09-19 22:34:11 +00:00
Zeev Suraski
9f61e47c24 MFZE1 (nuke cplusplus code) 2001-09-10 00:08:24 +00:00
Zeev Suraski
b06440bceb MFZE1 (support return value in execute_scripts) 2001-09-10 00:07:32 +00:00
Andi Gutmans
29f5dbe10b - Initial support for exceptions. 2001-08-30 15:26:30 +00:00
Andi Gutmans
9d11db1200 - Merge new $_GET, $_POST etc. patch from Engine 1 tree 2001-08-08 17:18:16 +00:00
Andi Gutmans
5af7770a81 - Sync Engine2 CVS with latest Engine CVS 2001-08-07 03:17:33 +00:00