Commit Graph

467 Commits

Author SHA1 Message Date
Andi Gutmans
7f6c2da50a - WS fix - "while (" instead of "while(" 2002-09-15 07:46:20 +00:00
Andi Gutmans
43139dc755 - WS - Always use "if (" and not "if(" 2002-09-15 07:45:26 +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
Stanislav Malyshev
c8a659f8f6 MFZE1 2002-09-02 09:13:53 +00:00
Thies C. Arntzen
10b58f2110 those are set by RETURN_FROM_EXECUTE 2002-08-23 12:18:54 +00:00
Thies C. Arntzen
d88ca858aa zend_execute: make sure that current_execute_data points to the right thing
after coming back from recursion.
2002-08-21 13:58:20 +00:00
Andi Gutmans
2372caf57e MFZE1 2002-08-17 20:20:36 +00:00
Zeev Suraski
b66561c44a MFZE1 2002-08-17 16:22:40 +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
Zeev Suraski
6025b804c2 MFZE1 2002-08-03 09:44:27 +00:00
Stanislav Malyshev
0e7c1f4609 MFZE1 2002-08-01 16:07:19 +00:00
Jason Greene
b0cf6c3112 MFZE1 global declare 2002-07-30 22:19:50 +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
35e8d8139e - Nuke some unused code 2002-07-14 18:17:07 +00:00
Andi Gutmans
677a9e8751 - Fix problem where scope was lost in nested function calls.
- Thanks to Timm Friebe for diving into this one.
2002-07-06 17:44:45 +00:00
Andi Gutmans
ede84fa384 - Improve some error messages. 2002-06-29 15:30:27 +00:00
Andi Gutmans
b55a20abf4 - Fix problem with scope's not changing correctly during method calls.
- Reapply a tiny optimization to the allocator so that in non-debug mode
- we clean memory without detecting leaks.
2002-06-26 11:07:35 +00:00
Andi Gutmans
68663bf96b - Revert patch which checks at run-time if you're allowed to assign
- certain values by reference.
- We still need to find a solution for cases when this shouldn't be allowed
- as it might cause leaks.
2002-06-24 17:58:22 +00:00
Andi Gutmans
9c148f0d84 - Fix problem with constructor not being inherited and called correctly. 2002-06-23 15:46:58 +00:00
Andi Gutmans
690c85b406 - Fix bug in class constants
- Start centralizing main class lookups. This will help implement
- __autload()
2002-06-16 18:25:05 +00:00
Andi Gutmans
b2015c5610 - Fix problem with assigning functions by reference. 2002-06-11 17:33:53 +00:00
Stanislav Malyshev
3a419fa8dd Fix leak 2002-06-10 09:15:02 +00:00
Sebastian Bergmann
e449646b68 Remove unused local variable. 2002-06-05 18:17:19 +00:00
Andi Gutmans
2d6404d5b0 - Allow overloaded objects to receive the method name in its original
- case.
2002-06-05 17:34:56 +00:00
Andi Gutmans
14a81f91e3 - Hopefully fix problems with debug_backtrace() 2002-05-08 18:43:19 +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
c84a4ead95 - Pass TSRMLS to callbacks. 2002-03-15 16:26:17 +00:00
Andi Gutmans
db84afb206 - Scope fix. When calling an imported function the scope will change
- correctly to the scope of the functions class.
<?php

	function Hello()
	{
		print "Wrong one\n";
	}

	class MyClass {
		static $hello = "Hello, World\n";

		function Hello()
		{
			print self::$hello;
		}

		function Trampoline()
		{
			Hello();
		}
	}

	import function Trampoline from MyClass;

	Trampoline();
?>
2002-03-15 15:28:06 +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
Stanislav Malyshev
40becd37e5 fix for delete $this and unset $this 2002-03-14 16:00:48 +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
Andi Gutmans
d77ff9607e - Fix build in ZTS mode. 2002-03-10 21:02:00 +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
90f6005f58 - Support importing constants. e.g.:
<?php

	class MyOuterClass {
		const Hello = "Hello, World\n";
	}

	import const Hello from MyOuterClass;
	print Hello;
2002-03-08 10:58:24 +00:00
Andi Gutmans
83f102fd9f - Add function * and class * functionality. Only constants are left.
<?php

	class MyOuterClass {
		class MyInnerClass {
			function func1()
			{
				print "func1()\n";
			}

			function func2()
			{
				print "func2()\n";
			}
		}
	}

	import class * from MyOuterClass;
	import function func2 from MyOuterClass::MyInnerClass;

	MyInnerClass::func1();
	func2();
2002-03-06 17:08:26 +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
8535164f21 - This small patch should also take care of allowing unseting of $this->foo
- and static members. The unset() opcode was luckily already suitable for
- object overloading.
2002-02-04 20:44:24 +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
c2b73faade - Fix a bug reported by Sebastian with indirect class names not working. 2002-01-22 18:02:52 +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
Andi Gutmans
0f398e4d4a - Make sure $this is passed on to methods 2002-01-06 19:52:22 +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
eb08cb956b - Improve performance of indirect-referenced function calls 2002-01-04 09:21:16 +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
Derick Rethans
9b391a83c2 - MFZE1 for exit fix, exposing current function name in error messages and
exposing zend_zval_type_name().
2002-01-03 14:19:13 +00:00
Andi Gutmans
b14f6cf79f - Support default arguments for reference parameters
- Fix two compile warnings
2001-12-28 13:28:33 +00:00
Andi Gutmans
b3fd2faac0 - Support parent:: again 2001-12-27 13:12:45 +00:00
Andi Gutmans
5cb454a8ad - Fix scoping issue. The following works now:
<?
	class MyClass {
		static $id = 0;

		function MyClass()
		{
			$this->id = self::$id++;
		}

		function _clone()
		{
			$this->name = $clone->name;
			$this->address = "New York";
			$this->id = self::$id++;
		}
	}



	$obj = new MyClass();

	$obj->name = "Hello";
	$obj->address = "Tel-Aviv";

	print $obj->id;
	print "\n";

	$obj = $obj->_clone();

	print $obj->id;
	print "\n";
	print $obj->name;
	print "\n";
	print $obj->address;
	print "\n";
2001-12-26 20:17:34 +00:00
Andi Gutmans
2ce4b47657 - Initial support for _clone() 2001-12-26 17:49:22 +00:00
Andi Gutmans
ee44180fc6 - Fix a crash (not a thorough fix).
- Commented old code
2001-12-25 16:51:37 +00:00
Andi Gutmans
df38ce3727 - Fixed bug where global functions weren't called if they didn't exist
- in the class scope
2001-12-24 17:39:16 +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
Andi Gutmans
4cb97fa3b9 - Rename zend_class_entry.constants -> zend_class_entry.constants_table 2001-12-11 18:46:43 +00:00
Andi Gutmans
1dcef1e4ea - Start making scope change correctly when calling namespace functions.
- When inside a namespace fallback to global namespace when function
- or constant is not found.
2001-12-11 17:56:57 +00:00
Sebastian Bergmann
d863d52a5d Update headers. 2001-12-11 15:16:21 +00:00
Andi Gutmans
3bfee898db - More namespaces work.
- Nuke memory leak.
2001-12-10 18:57:17 +00:00
Andi Gutmans
055709538c - Support constants. The following works now:
<?
	class foo {
		const GC = "foo constant\n";
	}

	define("GC", "Global constant\n");

	namespace;
	print GC;
	namespace foo;
	print GC;
	namespace;
	print foo::GC;

?>
2001-12-06 18:05:18 +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
e858d27888 - Initial support for class constants. There are still a few semantic
- issues which need to be looked into but basically it seems to work.
- Example:
<?php
	class foo
	{
		const hey = "hello";
	}

	print foo::hey;
?>
2001-11-30 16:29:47 +00:00
Andi Gutmans
d2da63f629 - Support static members. The following script works:
<?
	class foo
	{
		class bar
		{
			function init_values()
			{
				for ($i=1; $i<10; $i++) {
					foo::bar::$hello[$i] = $i*$i;
				}
			}

			function print_values()
			{
				for ($i=1; $i<10; $i++) {
					print foo::bar::$hello[$i] . "\n";
				}
			}
		}
	}

	foo::bar::init_values();
	foo::bar::print_values();

	for ($i=1; $i<10; $i++) {
		print $hello[$i]?"Shouldn't be printed\n":"";
	}
?>
2001-11-25 08:49:09 +00:00
Andi Gutmans
559d611a86 - MFZE1 2001-11-24 18:27:20 +00:00
Andi Gutmans
a332f826a7 - Support instantiation of nested class. The following script now should
- work:
-<?php
-	class foo
-	{
-		function bar()
-		{
-			print "bar() in class bar\n";
-		}
-
-		class barbara
-		{
-			function bar()
-			{
-				print "bar() in class foo::barbara\n";
-			}
-		}
-	}
-
-	$obj = new foo();
-	$obj->bar();
-
-	$obj = new foo::barbara();
-	$obj->bar();
-
2001-11-04 19:30:49 +00:00
Andi Gutmans
b87194e0c6 - Add constructor to the zend_class_entry instead of looking it up each
- time by name.
- This will allow the next patch of being able to instantiate nested
- classes such as new foo::bar::barbara();
2001-11-03 11:59:14 +00:00
Andi Gutmans
26578c386d - Initial support for nested class definitions 2001-10-29 17:19:02 +00:00
Zeev Suraski
8b53a129f7 MFTGZE1 2001-10-27 09:43:38 +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
Andi Gutmans
560606d210 - Get rid of warning and C++ comments 2001-08-30 15:31:35 +00:00
Andi Gutmans
29f5dbe10b - Initial support for exceptions. 2001-08-30 15:26:30 +00:00
Zeev Suraski
4684d5f405 MFZE1 2001-08-30 12:08:23 +00:00
Andi Gutmans
d87fa22532 - Merge Sterling's patches from ZE1 2001-08-18 18:16:49 +00:00
Andrei Zmievski
ea315a2e70 MFZE1 2001-08-17 17:42:43 +00:00
Andi Gutmans
f909ff9ed0 - Try and nuke get_object_zval_ptr() 2001-08-16 15:01:25 +00:00
Andi Gutmans
ea48c0c46a - Fix a bug in method calls.
- Try to get the old copying behavior of objects to work (doesn't work yet).
2001-08-16 14:04:04 +00:00
Andi Gutmans
33539126d0 - MFZE1 2001-08-13 18:33:41 +00:00
Andi Gutmans
30bad123f0 - MFZE1 2001-08-13 15:38:07 +00:00
Andi Gutmans
b6eb324cd2 - Merge from Engine 1 2001-08-13 15:23:37 +00:00
Andi Gutmans
5af7770a81 - Sync Engine2 CVS with latest Engine CVS 2001-08-07 03:17:33 +00:00
Andi Gutmans
e6697297b6 - Move to using Z_ macros 2001-08-06 02:52:03 +00:00
Zeev Suraski
7ecb33868c require_once()/include_once will return true in case a file was not included
because it was already included earlier.
Changed the default return value type of the include() family from long to
boolean
2001-08-02 17:27:19 +00:00
Zeev Suraski
d76cf1da18 More TSRMLS_FETCH work 2001-07-31 04:53:54 +00:00
Zeev Suraski
4187439cff More TSRMLS_FETCH work 2001-07-30 07:43:02 +00:00
Zeev Suraski
8ce8324e59 More TSRMLS_FETCH annihilation 2001-07-30 04:54:16 +00:00
Zeev Suraski
b57703825b Avoid TSRMLS_FETCH()'s (still lots of work left) 2001-07-30 01:48:22 +00:00
Zeev Suraski
b4f3b9d3ce Redesigned thread safety mechanism - nua nua 2001-07-28 10:51:54 +00:00
Zeev Suraski
2c254ba762 Get rid of ELS_*(), and use TSRMLS_*() instead.
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:10:39 +00:00
Zeev Suraski
06fc55cc67 Revert bogus patch 2001-07-19 14:11:40 +00:00
Zeev Suraski
553505cb61 Fix bug #11970 2001-07-15 16:51:30 +00:00
Zeev Suraski
85b4df53c0 Improved interactive mode - it is now available in all builds, without any significant slowdown 2001-07-15 14:08:58 +00:00
Zeev Suraski
2536259557 Fix leak in the patch, and revert a couple of lines I didn't mean to commit 2001-06-27 15:47:31 +00:00
Zeev Suraski
ee115c8ecc - Warn about illegal offsets
- Allow assignments to uninitialized string offsets (automatically pads the
  string with spaces)
2001-06-27 15:40:49 +00:00
Andi Gutmans
5bf89ce61c - Hopefully fix bug #11476 and improve garbage to be freed very quickly.
Tree tagged as PRE_GRANULAR_GARBAGE_FIX before commiting.
2001-06-21 22:30:23 +00:00
Andi Gutmans
8cd70926c5 - Nuke dependency of all of PHP on zend_execute_locks.h. 2001-06-21 21:17:10 +00:00
Zeev Suraski
851b1e3b35 Eliminate the leak that the original bogus code tried to solve 2001-06-21 15:33:55 +00:00
Zeev Suraski
cb0d2775fb parent::methodname() now works better with runtime classes (fix bug #11589) 2001-06-21 14:53:05 +00:00
Zeev Suraski
3276cfd950 Fix bug #11590 (I want Andi to also review this patch before it goes into 4.0.6) 2001-06-21 08:17:09 +00:00
Andi Gutmans
1aa5b19cc9 - Fix string offsets crash. 2001-06-20 17:14:58 +00:00
Zeev Suraski
0c164128f8 Add missing exports 2001-06-19 08:52:19 +00:00
Zeev Suraski
38085881a6 Fix warning 2001-06-19 08:42:22 +00:00
Zeev Suraski
f78e65cabf Floating point keys didn't work in array() (fix bug #6662) 2001-05-06 15:39:27 +00:00
Andi Gutmans
2d9eac7e0e - Patch by Andrei to prevent crash in error situation when not all
object overloading handles are defined.
2001-05-02 19:51:33 +00:00
Andi Gutmans
90cf65411c - Fix for crash bug when using invalid arguments in the foreach() loop.
- Reported by Yasuo Ohgaki
2001-04-20 07:09:22 +00:00
Andi Gutmans
492a619be3 - Whitespace 2001-03-10 09:21:48 +00:00
Zeev Suraski
36ded42156 Make parent:: work in runtime bindings as well 2001-03-07 10:07:25 +00:00
Zeev Suraski
87ee97e303 Fix bug #8899 (thanks Jani) 2001-03-04 22:27:56 +00:00
Andi Gutmans
d2c9e8074c - Update copyright year 2001-02-26 05:43:27 +00:00
Andi Gutmans
e0b2a5f583 - Remove duplicate code and do a tiny optimization in DO_FCALL 2001-02-09 12:47:57 +00:00
Zeev Suraski
c3531b3750 Fix string offset data corruption 2001-02-05 22:27:47 +00:00
Andi Gutmans
f67df57491 - That doesn't seem like a smart thing to do :)
- I wonder if gcc optimized it out.
2001-01-27 12:29:02 +00:00
Andi Gutmans
62606e7789 - Fix leak in fetch_dim_address() which was already fixed in
- fetch_dim_object(). Take the oppertunity to make both use the same
- function and not duplicate the code.
2001-01-17 17:34:16 +00:00
Andi Gutmans
7b5138035c - Remove unreachable code 2001-01-01 17:59:08 +00:00
Zeev Suraski
36eaad252f Allow get_current_key() not to return the key itself, instead of a duplicate 2000-12-22 12:49:51 +00:00
Andi Gutmans
8d9082563a - Allow passing references which are returned from functions and new
- statements to be passed by reference.
2000-11-27 18:46:23 +00:00
Sascha Schumann
2ef6b689e8 Pass on the exit status 2000-11-22 04:24:35 +00:00
Andi Gutmans
12077112b4 - The baby patch wasn't that innocent :) 2000-11-21 16:14:02 +00:00
Andi Gutmans
b2c957d4b1 - NEVER copy and paste :) 2000-11-20 20:54:10 +00:00
Andi Gutmans
b5d5b3a703 - Baby patch towards making the damn pass-by-ref work. 2000-11-20 20:49:42 +00:00
Andi Gutmans
6d2a433ec5 - This patch is broken and needs more thorough fixing. 2000-11-20 05:09:21 +00:00
Andi Gutmans
ce87ae4159 - Try and fix the problem when sending references returned from a function by reference. 2000-11-19 19:49:58 +00:00
Zeev Suraski
d0fbddcc2b Fix a corruption bug, when erroneously allowing to send non-variables by reference (several
bug-db reports seem to originate in this bug)
2000-10-29 19:16:29 +00:00
Zeev Suraski
dee2d85e77 Fix -a interactive mode (no idea how the previous commit got committed) 2000-10-11 18:51:52 +00:00
Zeev Suraski
48167d2b21 *** empty log message *** 2000-10-11 18:36:02 +00:00
Andi Gutmans
5418b59681 - Fix NULL handling in ARRAY opcode and resolve memory leak 2000-09-14 20:30:06 +00:00
Zeev Suraski
5286b3971c Make compile_string() accept a description of the code 2000-09-12 19:47:25 +00:00
Andi Gutmans
27de50012b - Use emalloc() for opened_path now. This was a potential leak before.
- This patch has potential to break stuff but I tested it as much as I
- could. Fixes should be easy.
2000-08-31 22:24:20 +00:00
Andi Gutmans
fbbc249f2b - Revert patch from 9/7/2000 which seems to have broken unset().
- I hope what made me do this patch doesn't appear again.
2000-08-24 19:03:35 +00:00
Andi Gutmans
c698e14635 - Beautify 2000-08-19 15:16:53 +00:00
Zeev Suraski
7795aca4ca Fix warning issue (compile errors inside require()'d files were incorrectly supressed) 2000-08-15 16:44:40 +00:00
Zeev Suraski
636d126e16 - Fix leak and some logic 2000-08-14 20:16:27 +00:00
Andi Gutmans
e46ea8864c - This patch should hopefully fix situations where a constructor uses
- the $this pointer as a reference.
2000-08-14 19:17:26 +00:00
Stanislav Malyshev
9e750e64b9 Fix crash 2000-08-14 09:06:56 +00:00
Stanislav Malyshev
5090b1e8d5 Fix zend_fiel_handle handling. Should fix URL include
and various opened_path inconsistencies.
2000-08-13 18:00:50 +00:00
Andi Gutmans
e5015ed581 @ Fix problem with nested foreach()'s (Andi, Zend Engine) 2000-08-10 22:08:02 +00:00
Zeev Suraski
c06692e9ec The patch we promised - redesigned the compilation/execution API:
Advantages:
- Smaller memory footprint for the op arrays
- Slightly faster compilation times (due to saved erealloc() calls and faster zend_op
  initialization)
- include_once() & require_once() share the same file list
- Consistency between include() and require() - this mostly means that return()
  works inside require()'d files just as it does in include() files (it used to
  be meaningless in require()'d files, most of the time (see below))
- Made require() consistent with itself.  Before, if the argument was not a constant
  string, require() took the include() behavior (with return()).
- Removed lots of duplicate code.
Bottom line - require() and include() are very similar now;  require() is simply an include()
which isn't allowed to fail.  Due to the erealloc() calls for large op arrays, require()
didn't end up being any faster than include() in the Zend engine.
2000-08-09 19:22:35 +00:00
Andi Gutmans
50ddf9e3d5 - Use some more SEPARATE_ZVAL macros instead of replicated code. 2000-08-05 13:54:07 +00:00
Stanislav Malyshev
8b9ecac2dc Fix memory leak 2000-08-05 11:06:00 +00:00
Andi Gutmans
fcdc025d11 - Beautify code. Try and use more macros for splitting instead of
- replicating the code everywhere.
2000-08-04 08:11:54 +00:00
Andi Gutmans
5ae343b752 - Remove commented code 2000-08-02 17:51:42 +00:00