Commit Graph

154 Commits

Author SHA1 Message Date
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
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
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
7cd6ccc0ec - Support static $var = 0; style initialization of static class
- members. For example:
-	class foo {
-		static $my_static = 5;
-
-	}
-
-	print foo::$my_static;
2001-11-26 18:05:01 +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
26578c386d - Initial support for nested class definitions 2001-10-29 17:19:02 +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
9f61e47c24 MFZE1 (nuke cplusplus code) 2001-09-10 00:08:24 +00:00
Zeev Suraski
819ea51d00 MFZE1 2001-08-31 13:11:52 +00:00
Andi Gutmans
619702157b - Make it compile in thread-safe mode. 2001-08-30 17:27:43 +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
Andi Gutmans
9d11db1200 - Merge new $_GET, $_POST etc. patch from Engine 1 tree 2001-08-08 17:18:16 +00:00
Andi Gutmans
cb1a40f399 - Preliminary patch for method() dereferencing 2001-08-08 15:07:11 +00:00
Andi Gutmans
5af7770a81 - Sync Engine2 CVS with latest Engine CVS 2001-08-07 03:17:33 +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
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
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
bda9c83a82 Recover from a parse error in include files (before, it could result in a crash under certain circumstances). Fix bug #8663 2001-05-06 19:30:31 +00:00
Zeev Suraski
1e63f44084 Support interactive mode in thread-safe builds 2001-05-06 14:36:25 +00:00
Andi Gutmans
d2c9e8074c - Update copyright year 2001-02-26 05:43:27 +00:00
Zeev Suraski
6f6e13de54 Use iostream.h instead of istream.h (IBM's compiler doesn't come with istream.h,
and iostream.h should include it)
2000-12-26 23:05:55 +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
Andi Gutmans
1ccf94066c - Move SET_UNUSED() to header 2000-11-11 17:59:47 +00:00
Andi Gutmans
5e33cdaef3 - Remove this damn thing once again. 2000-11-10 11:48:12 +00:00
Andi Gutmans
f950a3724c - Maybe it's OK now? :) 2000-11-09 23:54:18 +00:00
Andi Gutmans
113a5bb8c2 - Undo the previous commit for fixing $obj = new foo(). 2000-11-09 23:43:21 +00:00
Andi Gutmans
d9d4824cd3 - Commit experimental patch to fix the problem when doing $a = new foo()
and the constructor assigns $this by reference to other symbol table
  elements. Thanks to Daniel J. Rodriguez on this one.
2000-11-09 22:11:14 +00:00
Zeev Suraski
f1a9920bcf Maintain consistency 2000-11-02 19:27:55 +00:00
Andi Gutmans
ce501c78a8 - Replace do_exit() with zend_do_exit().
- Problem reported by David Hedbor <david@hedbor.org>
2000-11-02 18:42:54 +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
7b0d92dd18 Unify the names of these last 3 files... 2000-10-29 14:35:34 +00:00
Zeev Suraski
5286b3971c Make compile_string() accept a description of the code 2000-09-12 19:47:25 +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
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
f4e2a900d6 - Oops. Too early in the morning 2000-07-11 04:15:35 +00:00
Andi Gutmans
e95220e722 - Include iostream.h in C++. 2000-07-11 04:07:18 +00:00
Sascha Schumann
a61721741b Replace macros which begin with an underscore through an appropiately
named macro.
2000-07-03 00:55:36 +00:00