summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2010-10-21 08:52:46 +0200
committerOndřej Surý <ondrej@sury.org>2010-10-21 08:52:46 +0200
commit01fcdff3849c3691d9aaeaab735846ab6d8895ca (patch)
tree6460876d356113fa7053df36f2aa00baa7db24a9 /Zend
parent855a09f4eded707941180c9d90acd17c25e29447 (diff)
downloadphp-01fcdff3849c3691d9aaeaab735846ab6d8895ca.tar.gz
Imported Upstream version 5.3.3upstream/5.3.3
Diffstat (limited to 'Zend')
-rw-r--r--Zend/acinclude.m44
-rw-r--r--Zend/header2
-rwxr-xr-xZend/tests/bug35163.phpt18
-rwxr-xr-xZend/tests/bug35163_2.phpt37
-rwxr-xr-xZend/tests/bug35163_3.phpt22
-rwxr-xr-xZend/tests/bug35239.phpt24
-rwxr-xr-xZend/tests/bug35634.phpt6
-rw-r--r--Zend/tests/bug45180.phpt6
-rw-r--r--Zend/tests/bug45186.phpt8
-rw-r--r--Zend/tests/bug45877.phpt4
-rw-r--r--Zend/tests/bug46665.phpt2
-rw-r--r--Zend/tests/bug48215.phpt2
-rw-r--r--Zend/tests/bug48215_2.phpt3
-rw-r--r--Zend/tests/bug48930.phpt16
-rw-r--r--Zend/tests/bug49893.phpt28
-rw-r--r--Zend/tests/bug50383.phpt130
-rw-r--r--Zend/tests/bug50810.phpt46
-rw-r--r--Zend/tests/bug51176.phpt32
-rw-r--r--Zend/tests/bug51394.phpt16
-rw-r--r--Zend/tests/bug51791.phpt14
-rw-r--r--Zend/tests/bug51822.phpt40
-rw-r--r--Zend/tests/bug51827.phpt19
-rw-r--r--Zend/tests/bug52001.phpt17
-rw-r--r--Zend/tests/bug52041.phpt50
-rw-r--r--Zend/tests/bug52051.phpt27
-rw-r--r--Zend/tests/bug52060.phpt12
-rw-r--r--Zend/tests/bug52160.phpt34
-rw-r--r--Zend/tests/bug52193.phpt78
-rw-r--r--Zend/tests/bug52237.phpt11
-rw-r--r--Zend/tests/call_static_003.phpt4
-rw-r--r--Zend/tests/call_static_007.phpt2
-rw-r--r--Zend/tests/closure_020.phpt13
-rw-r--r--Zend/tests/closure_034.phpt10
-rw-r--r--Zend/tests/closure_035.phpt10
-rw-r--r--Zend/tests/foreach_002.phpt5
-rw-r--r--Zend/tests/gc_004.phpt7
-rw-r--r--Zend/tests/gc_005.phpt11
-rw-r--r--Zend/tests/gc_006.phpt14
-rw-r--r--Zend/tests/gc_007.phpt7
-rw-r--r--Zend/tests/gc_008.phpt11
-rw-r--r--Zend/tests/gc_009.phpt14
-rw-r--r--Zend/tests/gc_010.phpt7
-rw-r--r--Zend/tests/gc_011.phpt11
-rw-r--r--Zend/tests/gc_012.phpt2
-rw-r--r--Zend/tests/gc_013.phpt2
-rw-r--r--Zend/tests/gc_014.phpt2
-rw-r--r--Zend/tests/gc_015.phpt2
-rw-r--r--Zend/tests/gc_016.phpt2
-rw-r--r--Zend/tests/gc_017.phpt2
-rw-r--r--Zend/tests/gc_018.phpt2
-rw-r--r--Zend/tests/gc_019.phpt2
-rw-r--r--Zend/tests/gc_020.phpt2
-rw-r--r--Zend/tests/gc_021.phpt2
-rw-r--r--Zend/tests/gc_022.phpt1
-rw-r--r--Zend/tests/gc_023.phpt2
-rw-r--r--Zend/tests/gc_024.phpt2
-rw-r--r--Zend/tests/gc_025.phpt2
-rw-r--r--Zend/tests/gc_027.phpt2
-rw-r--r--Zend/tests/gc_028.phpt2
-rw-r--r--Zend/tests/gc_029.phpt2
-rw-r--r--Zend/tests/gc_030.phpt4
-rw-r--r--Zend/tests/ns_063.phpt3
-rw-r--r--Zend/tests/objects_011.phpt3
-rw-r--r--Zend/tests/objects_020.phpt14
-rw-r--r--Zend/zend.h2
-rw-r--r--Zend/zend_API.c46
-rw-r--r--Zend/zend_alloc.c4
-rw-r--r--Zend/zend_builtin_functions.c30
-rw-r--r--Zend/zend_compile.c34
-rw-r--r--Zend/zend_compile.h8
-rw-r--r--Zend/zend_execute.c3
-rw-r--r--Zend/zend_execute.h4
-rw-r--r--Zend/zend_execute_API.c26
-rw-r--r--Zend/zend_extensions.c2
-rw-r--r--Zend/zend_float.h6
-rw-r--r--Zend/zend_gc.c50
-rw-r--r--Zend/zend_globals.h2
-rw-r--r--Zend/zend_hash.c4
-rw-r--r--Zend/zend_highlight.c2
-rw-r--r--Zend/zend_indent.c2
-rw-r--r--Zend/zend_ini_parser.c212
-rw-r--r--Zend/zend_ini_parser.output734
-rw-r--r--Zend/zend_ini_parser.y21
-rw-r--r--Zend/zend_ini_scanner.c6
-rw-r--r--Zend/zend_ini_scanner.l4
-rw-r--r--Zend/zend_ini_scanner_defs.h2
-rwxr-xr-xZend/zend_interfaces.c2
-rw-r--r--Zend/zend_language_scanner.c686
-rw-r--r--Zend/zend_language_scanner.l20
-rw-r--r--Zend/zend_language_scanner_defs.h2
-rw-r--r--Zend/zend_object_handlers.c10
-rw-r--r--Zend/zend_objects.c20
-rw-r--r--Zend/zend_opcode.c7
-rw-r--r--Zend/zend_operators.c40
-rw-r--r--Zend/zend_stream.c4
-rw-r--r--Zend/zend_variables.c2
-rw-r--r--Zend/zend_variables.h2
-rw-r--r--Zend/zend_vm_def.h21
-rw-r--r--Zend/zend_vm_execute.h53
-rw-r--r--Zend/zend_vm_gen.php5
100 files changed, 1928 insertions, 1041 deletions
diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4
index 046950db1..643ae2b29 100644
--- a/Zend/acinclude.m4
+++ b/Zend/acinclude.m4
@@ -1,10 +1,10 @@
-dnl $Id: acinclude.m4 275828 2009-02-14 21:08:02Z rasmus $
+dnl $Id: acinclude.m4 298893 2010-05-03 09:05:30Z pajoye $
dnl
dnl This file contains local autoconf functions.
AC_DEFUN([LIBZEND_BISON_CHECK],[
# we only support certain bison versions
- bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1"
+ bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2"
# for standalone build of Zend Engine
test -z "$SED" && SED=sed
diff --git a/Zend/header b/Zend/header
index 868606211..267c96340 100644
--- a/Zend/header
+++ b/Zend/header
@@ -16,4 +16,4 @@
+----------------------------------------------------------------------+
*/
-/* $Id: header 294437 2010-02-03 18:47:13Z pajoye $ */
+/* $Id: header 293380 2010-01-11 03:01:19Z iliaa $ */
diff --git a/Zend/tests/bug35163.phpt b/Zend/tests/bug35163.phpt
index 4501fa937..6a10d244b 100755
--- a/Zend/tests/bug35163.phpt
+++ b/Zend/tests/bug35163.phpt
@@ -17,22 +17,8 @@ array(1) {
[0]=>
int(2)
[1]=>
- &array(3) {
- [0]=>
- int(2)
- [1]=>
- *RECURSION*
- [2]=>
- *RECURSION*
- }
+ *RECURSION*
[2]=>
- &array(3) {
- [0]=>
- int(2)
- [1]=>
- *RECURSION*
- [2]=>
- *RECURSION*
- }
+ *RECURSION*
}
}
diff --git a/Zend/tests/bug35163_2.phpt b/Zend/tests/bug35163_2.phpt
index 4adf7709a..01387204c 100755
--- a/Zend/tests/bug35163_2.phpt
+++ b/Zend/tests/bug35163_2.phpt
@@ -20,46 +20,17 @@ array(3) {
[0]=>
int(2)
[1]=>
- &array(3) {
- [0]=>
- int(2)
- [1]=>
- *RECURSION*
- [2]=>
- *RECURSION*
- }
+ *RECURSION*
[2]=>
- &array(3) {
- [0]=>
- int(2)
- [1]=>
- *RECURSION*
- [2]=>
- *RECURSION*
- }
+ *RECURSION*
}
[2]=>
&array(3) {
[0]=>
int(2)
[1]=>
- &array(3) {
- [0]=>
- int(2)
- [1]=>
- *RECURSION*
- [2]=>
- *RECURSION*
- }
+ *RECURSION*
[2]=>
- &array(3) {
- [0]=>
- int(2)
- [1]=>
- *RECURSION*
- [2]=>
- *RECURSION*
- }
+ *RECURSION*
}
}
-
diff --git a/Zend/tests/bug35163_3.phpt b/Zend/tests/bug35163_3.phpt
index d2b3c25bf..6c6a57f25 100755
--- a/Zend/tests/bug35163_3.phpt
+++ b/Zend/tests/bug35163_3.phpt
@@ -11,29 +11,15 @@ var_dump($a);
$a->b = null;
$a = null;
?>
---EXPECT--
-object(stdClass)#1 (1) {
+--EXPECTF--
+object(stdClass)#%d (1) {
["b"]=>
&array(3) {
[0]=>
int(2)
[1]=>
- &array(3) {
- [0]=>
- int(2)
- [1]=>
- *RECURSION*
- [2]=>
- *RECURSION*
- }
+ *RECURSION*
[2]=>
- &array(3) {
- [0]=>
- int(2)
- [1]=>
- *RECURSION*
- [2]=>
- *RECURSION*
- }
+ *RECURSION*
}
}
diff --git a/Zend/tests/bug35239.phpt b/Zend/tests/bug35239.phpt
index 7fc7b7d3b..869971e2a 100755
--- a/Zend/tests/bug35239.phpt
+++ b/Zend/tests/bug35239.phpt
@@ -12,30 +12,16 @@ var_dump($a);
$a->x0->y1 = "ok\n";
echo $a->x0;
?>
---EXPECT--
-object(stdClass)#1 (1) {
+--EXPECTF--
+object(stdClass)#%d (1) {
["x0"]=>
- &object(stdClass)#2 (3) {
+ &object(stdClass)#%d (3) {
["y0"]=>
string(1) "b"
["y1"]=>
- &object(stdClass)#2 (3) {
- ["y0"]=>
- string(1) "b"
- ["y1"]=>
- *RECURSION*
- ["y2"]=>
- *RECURSION*
- }
+ *RECURSION*
["y2"]=>
- &object(stdClass)#2 (3) {
- ["y0"]=>
- string(1) "b"
- ["y1"]=>
- *RECURSION*
- ["y2"]=>
- *RECURSION*
- }
+ *RECURSION*
}
}
ok
diff --git a/Zend/tests/bug35634.phpt b/Zend/tests/bug35634.phpt
index 9681b6ad4..1437017a3 100755
--- a/Zend/tests/bug35634.phpt
+++ b/Zend/tests/bug35634.phpt
@@ -30,7 +30,9 @@ if (defined("pass3")) {
set_error_handler('errorHandler');
define("pass2", 1);
include(__FILE__);
+ print "ok\n";
}
+
?>
---EXPECTF--
-Error: Redefining already defined constructor for class TestClass (%sbug35634.php:12)
+--EXPECT--
+ok
diff --git a/Zend/tests/bug45180.phpt b/Zend/tests/bug45180.phpt
index 285543aaf..4e1ab9ee0 100644
--- a/Zend/tests/bug45180.phpt
+++ b/Zend/tests/bug45180.phpt
@@ -43,11 +43,11 @@ __call:
string(3) "ABC"
__call:
string(3) "ABC"
-__call:
+__callstatic:
string(3) "XYZ"
-__call:
+__callstatic:
string(3) "WWW"
-__call:
+__callstatic:
string(3) "ABC"
__callstatic:
string(1) "A"
diff --git a/Zend/tests/bug45186.phpt b/Zend/tests/bug45186.phpt
index bcf88a189..da7ac73f5 100644
--- a/Zend/tests/bug45186.phpt
+++ b/Zend/tests/bug45186.phpt
@@ -35,17 +35,17 @@ call_user_func('self::y');
?>
--EXPECTF--
-__call:
+__callstatic:
string(3) "ABC"
-__call:
+__callstatic:
string(3) "ABC"
__call:
string(3) "xyz"
-__call:
+__callstatic:
string(3) "www"
__call:
string(1) "y"
-__call:
+__callstatic:
string(1) "y"
ok
__callstatic:
diff --git a/Zend/tests/bug45877.phpt b/Zend/tests/bug45877.phpt
index 270377056..ec44cb061 100644
--- a/Zend/tests/bug45877.phpt
+++ b/Zend/tests/bug45877.phpt
@@ -1,7 +1,7 @@
--TEST--
Bug #45877 (Array key '2147483647' left as string)
--INI--
-precision=20
+precision=16
--FILE--
<?php
$keys = array(PHP_INT_MAX,
@@ -18,6 +18,6 @@ array(3) {
int(1)
[-%d8]=>
int(1)
- ["%d8"]=>
+ ["%s"]=>
int(1)
}
diff --git a/Zend/tests/bug46665.phpt b/Zend/tests/bug46665.phpt
index 8e7fc086d..1f8245438 100644
--- a/Zend/tests/bug46665.phpt
+++ b/Zend/tests/bug46665.phpt
@@ -12,4 +12,4 @@ function __autoload($class) {
?>
--EXPECTF--
-%string|unicode%(12) "\Foo\Bar\Baz"
+%string|unicode%(11) "Foo\Bar\Baz"
diff --git a/Zend/tests/bug48215.phpt b/Zend/tests/bug48215.phpt
index 99c4dd289..2e156ad7f 100644
--- a/Zend/tests/bug48215.phpt
+++ b/Zend/tests/bug48215.phpt
@@ -29,8 +29,6 @@ $b->A();
?>
===DONE===
--EXPECTF--
-
-Strict Standards: Redefining already defined constructor for class A in %s on line %d
B::__construct
A::__construct
B::A
diff --git a/Zend/tests/bug48215_2.phpt b/Zend/tests/bug48215_2.phpt
index 30f0734ac..199a25220 100644
--- a/Zend/tests/bug48215_2.phpt
+++ b/Zend/tests/bug48215_2.phpt
@@ -16,7 +16,4 @@ $c = new c();
?>
===DONE===
--EXPECTF--
-
-Strict Standards: Redefining already defined constructor for class a in %s on line %d
-
Fatal error: Call to undefined method b::b() in %s on line %d
diff --git a/Zend/tests/bug48930.phpt b/Zend/tests/bug48930.phpt
new file mode 100644
index 000000000..13b67f236
--- /dev/null
+++ b/Zend/tests/bug48930.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP>=5.3)
+--FILE--
+#!php
+<?php
+
+/*
+ * Test
+ */
+printf("__COMPILER_HALT_OFFSET__ is %d\n",__COMPILER_HALT_OFFSET__);
+
+__halt_compiler();
+
+?>
+--EXPECT--
+__COMPILER_HALT_OFFSET__ is 116
diff --git a/Zend/tests/bug49893.phpt b/Zend/tests/bug49893.phpt
new file mode 100644
index 000000000..b340f7bdf
--- /dev/null
+++ b/Zend/tests/bug49893.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Bug #49893 (Crash while creating an instance of Zend_Mail_Storage_Pop3)
+--FILE--
+<?php
+class A {
+ function __destruct() {
+ try {
+ throw new Exception("2");
+ } catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+ }
+ }
+}
+class B {
+ function __construct() {
+ $this->a = new A();
+ throw new Exception("1");
+ }
+}
+try {
+ $b = new B();
+} catch(Exception $e) {
+ echo $e->getMessage() . "\n";;
+}
+?>
+--EXPECT--
+2
+1
diff --git a/Zend/tests/bug50383.phpt b/Zend/tests/bug50383.phpt
new file mode 100644
index 000000000..2210c4bc3
--- /dev/null
+++ b/Zend/tests/bug50383.phpt
@@ -0,0 +1,130 @@
+--TEST--
+Bug #50383 (Exceptions thrown in __call / __callStatic do not include file and line in trace)
+--FILE--
+<?php
+
+class myClass {
+ public static function __callStatic($method, $args) {
+ throw new Exception("Missing static method '$method'\n");
+ }
+ public function __call($method, $args) {
+ throw new Exception("Missing method '$method'\n");
+ }
+}
+
+function thrower() {
+ myClass::ThrowException();
+}
+function thrower2() {
+ $x = new myClass;
+ $x->foo();
+}
+
+try {
+ thrower();
+} catch(Exception $e) {
+ print $e->getMessage();
+ print_r($e->getTrace());
+}
+
+try {
+ thrower2();
+} catch (Exception $e) {
+ print $e->getMessage();
+ print_r($e->getTrace());
+}
+
+?>
+--EXPECTF--
+Missing static method 'ThrowException'
+Array
+(
+ [0] => Array
+ (
+ [file] => %s
+ [line] => 13
+ [function] => __callStatic
+ [class] => myClass
+ [type] => ::
+ [args] => Array
+ (
+ [0] => ThrowException
+ [1] => Array
+ (
+ )
+
+ )
+
+ )
+
+ [1] => Array
+ (
+ [file] => %s
+ [line] => 13
+ [function] => ThrowException
+ [class] => myClass
+ [type] => ::
+ [args] => Array
+ (
+ )
+
+ )
+
+ [2] => Array
+ (
+ [file] => %s
+ [line] => 21
+ [function] => thrower
+ [args] => Array
+ (
+ )
+
+ )
+
+)
+Missing method 'foo'
+Array
+(
+ [0] => Array
+ (
+ [file] => %s
+ [line] => 17
+ [function] => __call
+ [class] => myClass
+ [type] => ->
+ [args] => Array
+ (
+ [0] => foo
+ [1] => Array
+ (
+ )
+
+ )
+
+ )
+
+ [1] => Array
+ (
+ [file] => %s
+ [line] => 17
+ [function] => foo
+ [class] => myClass
+ [type] => ->
+ [args] => Array
+ (
+ )
+
+ )
+
+ [2] => Array
+ (
+ [file] => %s
+ [line] => 28
+ [function] => thrower2
+ [args] => Array
+ (
+ )
+
+ )
+
+)
diff --git a/Zend/tests/bug50810.phpt b/Zend/tests/bug50810.phpt
new file mode 100644
index 000000000..8b4d7190e
--- /dev/null
+++ b/Zend/tests/bug50810.phpt
@@ -0,0 +1,46 @@
+--TEST--
+Bug #50810 (property_exists does not work for private)
+--FILE--
+<?php
+
+class ExampleSuperClass
+{
+ private $foo;
+ static protected $bar;
+
+ private function foo()
+ {
+ }
+
+ public function propertyFooExists()
+ {
+ return property_exists($this, 'foo');
+ }
+
+}
+
+class ExampleSubClass extends ExampleSuperClass
+{
+ public function methodExists()
+ {
+ return method_exists($this, 'foo');
+ }
+
+ public function propertyBarExists()
+ {
+ return property_exists($this, 'bar');
+ }
+}
+
+$example = new ExampleSubClass();
+var_dump($example->methodExists());
+var_dump(method_exists($example, 'propertyFooExists'));
+var_dump($example->propertyFooExists());
+var_dump($example->propertyBarExists());
+
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)
+bool(true)
diff --git a/Zend/tests/bug51176.phpt b/Zend/tests/bug51176.phpt
new file mode 100644
index 000000000..436378eff
--- /dev/null
+++ b/Zend/tests/bug51176.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Bug #51176 (Static calling in non-static method behaves like $this->)
+--FILE--
+<?php
+class Foo
+{
+ public function start()
+ {
+ self::bar();
+ static::bar();
+ Foo::bar();
+ }
+
+ public function __call($n, $a)
+ {
+ echo "instance\n";
+ }
+
+ public static function __callStatic($n, $a)
+ {
+ echo "static\n";
+ }
+}
+
+$foo = new Foo();
+$foo->start();
+
+?>
+--EXPECT--
+static
+static
+static
diff --git a/Zend/tests/bug51394.phpt b/Zend/tests/bug51394.phpt
new file mode 100644
index 000000000..537574c9d
--- /dev/null
+++ b/Zend/tests/bug51394.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #51394 (Error line reported incorrectly if error handler throws an exception)
+--INI--
+error_reporting=-1
+--FILE--
+<?php
+function eh()
+{
+ throw new Exception("error!");
+ return false;
+}
+
+set_error_handler("eh");
+$a = $empty($b);
+--EXPECTF--
+Fatal error: Function name must be a string in %sbug51394.php on line 9 \ No newline at end of file
diff --git a/Zend/tests/bug51791.phpt b/Zend/tests/bug51791.phpt
new file mode 100644
index 000000000..b6ced4bcc
--- /dev/null
+++ b/Zend/tests/bug51791.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #51791 (constant() failed to check undefined constant and php interpreter stoped)
+--FILE--
+<?php
+
+class A {
+ const B = 1;
+}
+var_dump(constant('A::B1'));
+
+?>
+--EXPECTF--
+Warning: constant(): Couldn't find constant A::B1 in %s on line %d
+NULL
diff --git a/Zend/tests/bug51822.phpt b/Zend/tests/bug51822.phpt
new file mode 100644
index 000000000..cffae7bb1
--- /dev/null
+++ b/Zend/tests/bug51822.phpt
@@ -0,0 +1,40 @@
+--TEST--
+Bug #51822 (Segfault with strange __destruct() for static class variables)
+--FILE--
+<?php
+class DestructableObject
+{
+ public function __destruct()
+ {
+ echo "2\n";
+ }
+}
+
+class DestructorCreator
+{
+ public function __destruct()
+ {
+ $this->test = new DestructableObject;
+ echo "1\n";
+ }
+}
+
+class Test
+{
+ public static $mystatic;
+}
+
+// Uncomment this to avoid segfault
+//Test::$mystatic = new DestructorCreator();
+
+$x = new Test();
+
+if (!isset(Test::$mystatic))
+ Test::$mystatic = new DestructorCreator();
+
+echo "bla\n";
+?>
+--EXPECT--
+bla
+1
+2
diff --git a/Zend/tests/bug51827.phpt b/Zend/tests/bug51827.phpt
new file mode 100644
index 000000000..083474945
--- /dev/null
+++ b/Zend/tests/bug51827.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #51827 (Bad warning when register_shutdown_function called with wrong num of parameters)
+--FILE--
+<?php
+
+
+function abc() {
+ var_dump(1);
+}
+
+register_shutdown_function('timE');
+register_shutdown_function('ABC');
+register_shutdown_function('exploDe');
+
+?>
+--EXPECTF--
+int(1)
+
+Warning: explode() expects at least 2 parameters, 0 given in Unknown on line %d
diff --git a/Zend/tests/bug52001.phpt b/Zend/tests/bug52001.phpt
new file mode 100644
index 000000000..cf55d195b
--- /dev/null
+++ b/Zend/tests/bug52001.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #52001 (Memory allocation problems after using variable variables)
+--FILE--
+<?php
+a(0,$$var);
+
+$temp1=1;
+$temp2=2;
+var_dump($temp1);
+
+function a($b,$c) {}
+?>
+--EXPECTF--
+Notice: Undefined variable: var in %sbug52001.php on line 2
+
+Notice: Undefined variable: in %sbug52001.php on line 2
+int(1)
diff --git a/Zend/tests/bug52041.phpt b/Zend/tests/bug52041.phpt
new file mode 100644
index 000000000..b481b894d
--- /dev/null
+++ b/Zend/tests/bug52041.phpt
@@ -0,0 +1,50 @@
+--TEST--
+Bug #52041 (Memory leak when writing on uninitialized variable returned from function)
+--FILE--
+<?php
+function foo() {
+ return $x;
+}
+
+foo()->a = 1;
+foo()->a->b = 2;
+foo()->a++;
+foo()->a->b++;
+foo()->a += 2;
+foo()->a->b += 2;
+
+//foo()[0] = 1;
+//foo()[0][0] = 2;
+//foo()[0]++;
+//foo()[0][0]++;
+//foo()[0] += 2;
+//foo()[0][0] += 2;
+var_dump(foo());
+?>
+--EXPECTF--
+Notice: Undefined variable: x in %sbug52041.php on line 3
+
+Strict Standards: Creating default object from empty value in %sbug52041.php on line 6
+
+Notice: Undefined variable: x in %sbug52041.php on line 3
+
+Strict Standards: Creating default object from empty value in %sbug52041.php on line 7
+
+Notice: Undefined variable: x in %sbug52041.php on line 3
+
+Strict Standards: Creating default object from empty value in %sbug52041.php on line 8
+
+Notice: Undefined variable: x in %sbug52041.php on line 3
+
+Strict Standards: Creating default object from empty value in %sbug52041.php on line 9
+
+Notice: Undefined variable: x in %sbug52041.php on line 3
+
+Strict Standards: Creating default object from empty value in %sbug52041.php on line 10
+
+Notice: Undefined variable: x in %sbug52041.php on line 3
+
+Strict Standards: Creating default object from empty value in %sbug52041.php on line 11
+
+Notice: Undefined variable: x in %sbug52041.php on line 3
+NULL
diff --git a/Zend/tests/bug52051.phpt b/Zend/tests/bug52051.phpt
new file mode 100644
index 000000000..e8a4f49e3
--- /dev/null
+++ b/Zend/tests/bug52051.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Bug #52051 (handling of case sensitivity of old-style constructors changed in 5.3+)
+--FILE--
+<?php
+
+class AA {
+ function AA() { echo "foo\n"; }
+}
+class bb extends AA {}
+class CC extends bb {
+ function CC() { parent::bb(); }
+}
+new CC();
+
+class A {
+ function A() { echo "bar\n"; }
+}
+class B extends A {}
+class C extends B {
+ function C() { parent::B(); }
+}
+new C();
+
+?>
+--EXPECT--
+foo
+bar
diff --git a/Zend/tests/bug52060.phpt b/Zend/tests/bug52060.phpt
new file mode 100644
index 000000000..fef603b0c
--- /dev/null
+++ b/Zend/tests/bug52060.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #52060 (Memory leak when passing a closure to method_exists())
+--FILE--
+<?php
+
+$closure = function($a) { echo $a; };
+
+var_dump(method_exists($closure, '__invoke')); // true
+
+?>
+--EXPECT--
+bool(true)
diff --git a/Zend/tests/bug52160.phpt b/Zend/tests/bug52160.phpt
new file mode 100644
index 000000000..c85d2f09a
--- /dev/null
+++ b/Zend/tests/bug52160.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Bug #52160 (Invalid E_STRICT redefined constructor error)
+--FILE--
+<?php
+
+class bar {
+ function __construct() { }
+ static function bar() {
+ var_dump(1);
+ }
+}
+
+bar::bar();
+
+class foo {
+ static function foo() {
+ var_dump(2);
+ }
+ function __construct() { }
+}
+
+foo::foo();
+
+class baz {
+ static function baz() {
+ var_dump(3);
+ }
+}
+
+?>
+--EXPECTF--
+Strict Standards: Redefining already defined constructor for class foo in %s on line %d
+
+Fatal error: Constructor baz::baz() cannot be static in %s on line %d
diff --git a/Zend/tests/bug52193.phpt b/Zend/tests/bug52193.phpt
new file mode 100644
index 000000000..7452672e3
--- /dev/null
+++ b/Zend/tests/bug52193.phpt
@@ -0,0 +1,78 @@
+--TEST--
+Bug #52193 (converting closure to array yields empty array)
+--FILE--
+<?php
+
+var_dump((array) 1);
+var_dump((array) NULL);
+var_dump((array) new stdclass);
+var_dump($h = (array) function () { return 2; });
+var_dump($h[0]());
+
+$i = function () use (&$h) {
+ return $h;
+};
+
+var_dump($x = (array)$i);
+var_dump($y = $x[0]);
+var_dump($y());
+
+$items = range(1, 5);
+$func = function(){ return 'just a test'; };
+
+array_splice($items, 0 , 4, $func);
+var_dump($items);
+
+?>
+--EXPECTF--
+array(1) {
+ [0]=>
+ int(1)
+}
+array(0) {
+}
+array(0) {
+}
+array(1) {
+ [0]=>
+ object(Closure)#%d (0) {
+ }
+}
+int(2)
+array(1) {
+ [0]=>
+ object(Closure)#%d (1) {
+ ["static"]=>
+ array(1) {
+ ["h"]=>
+ &array(1) {
+ [0]=>
+ object(Closure)#%d (0) {
+ }
+ }
+ }
+ }
+}
+object(Closure)#%d (1) {
+ ["static"]=>
+ array(1) {
+ ["h"]=>
+ &array(1) {
+ [0]=>
+ object(Closure)#%d (0) {
+ }
+ }
+ }
+}
+array(1) {
+ [0]=>
+ object(Closure)#%d (0) {
+ }
+}
+array(2) {
+ [0]=>
+ object(Closure)#%d (0) {
+ }
+ [1]=>
+ int(5)
+}
diff --git a/Zend/tests/bug52237.phpt b/Zend/tests/bug52237.phpt
new file mode 100644
index 000000000..a466a8ce0
--- /dev/null
+++ b/Zend/tests/bug52237.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Bug #52237 (Crash when passing the reference of the property of a non-object)
+--FILE--
+<?php
+$data = 'test';
+preg_match('//', '', $data->info);
+var_dump($data);
+?>
+--EXPECTF--
+Warning: Attempt to modify property of non-object in %sbug52237.php on line 3
+string(4) "test"
diff --git a/Zend/tests/call_static_003.phpt b/Zend/tests/call_static_003.phpt
index 566ff0fdf..d5e2b7529 100644
--- a/Zend/tests/call_static_003.phpt
+++ b/Zend/tests/call_static_003.phpt
@@ -28,9 +28,9 @@ foo::BAZ();
--EXPECT--
nonstatic
string(6) "fOoBaR"
-nonstatic
+static
string(6) "foOBAr"
-nonstatic
+static
string(6) "fOOBAr"
static
string(3) "bAr"
diff --git a/Zend/tests/call_static_007.phpt b/Zend/tests/call_static_007.phpt
index 419f10231..766802092 100644
--- a/Zend/tests/call_static_007.phpt
+++ b/Zend/tests/call_static_007.phpt
@@ -30,5 +30,5 @@ a::Foo();
--EXPECT--
__callstatic: Test
__call: Test
-__call: Bar
+__callstatic: Bar
__callstatic: Foo
diff --git a/Zend/tests/closure_020.phpt b/Zend/tests/closure_020.phpt
index 7b4c60b9b..9d04a9af5 100644
--- a/Zend/tests/closure_020.phpt
+++ b/Zend/tests/closure_020.phpt
@@ -31,18 +31,7 @@ object(foo)#%d (%d) {
["static"]=>
array(1) {
["a"]=>
- &object(foo)#%d (2) {
- ["test":"foo":private]=>
- int(3)
- ["a"]=>
- object(Closure)#%d (1) {
- ["static"]=>
- array(1) {
- ["a"]=>
- *RECURSION*
- }
- }
- }
+ *RECURSION*
}
}
}
diff --git a/Zend/tests/closure_034.phpt b/Zend/tests/closure_034.phpt
index d1356c31d..8ba276a68 100644
--- a/Zend/tests/closure_034.phpt
+++ b/Zend/tests/closure_034.phpt
@@ -9,17 +9,11 @@ var_dump($a);
?>
===DONE===
--EXPECTF--
-object(Closure)#1 (1) {
+object(Closure)#%d (1) {
["static"]=>
array(1) {
["a"]=>
- &object(Closure)#1 (1) {
- ["static"]=>
- array(1) {
- ["a"]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
===DONE===
diff --git a/Zend/tests/closure_035.phpt b/Zend/tests/closure_035.phpt
index ac8b4caea..e39a991ab 100644
--- a/Zend/tests/closure_035.phpt
+++ b/Zend/tests/closure_035.phpt
@@ -18,14 +18,8 @@ var_dump($x());
object(Closure)#%d (1) {
["static"]=>
array(1) {
- [%u|b%"x"]=>
- &object(Closure)#%d (1) {
- ["static"]=>
- array(1) {
- [%u|b%"x"]=>
- *RECURSION*
- }
- }
+ ["x"]=>
+ *RECURSION*
}
}
int(1)
diff --git a/Zend/tests/foreach_002.phpt b/Zend/tests/foreach_002.phpt
index 643e65392..5523424ce 100644
--- a/Zend/tests/foreach_002.phpt
+++ b/Zend/tests/foreach_002.phpt
@@ -15,9 +15,6 @@ array(1) {
["a"]=>
&array(1) {
["a"]=>
- &array(1) {
- ["a"]=>
- *RECURSION*
- }
+ *RECURSION*
}
}
diff --git a/Zend/tests/gc_004.phpt b/Zend/tests/gc_004.phpt
index ce6a94b79..1b6f70abe 100644
--- a/Zend/tests/gc_004.phpt
+++ b/Zend/tests/gc_004.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 004: Simple array cycle
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = array();
@@ -14,10 +16,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
+ *RECURSION*
}
}
int(1)
diff --git a/Zend/tests/gc_005.phpt b/Zend/tests/gc_005.phpt
index 0660ded2f..71fb8909f 100644
--- a/Zend/tests/gc_005.phpt
+++ b/Zend/tests/gc_005.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 005: Simple object cycle
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = new stdClass();
@@ -9,13 +11,10 @@ unset($a);
var_dump(gc_collect_cycles());
echo "ok\n"
?>
---EXPECT--
-object(stdClass)#1 (1) {
+--EXPECTF--
+object(stdClass)#%d (1) {
["a"]=>
- object(stdClass)#1 (1) {
- ["a"]=>
- *RECURSION*
- }
+ *RECURSION*
}
int(1)
ok
diff --git a/Zend/tests/gc_006.phpt b/Zend/tests/gc_006.phpt
index 4ba0d9267..c633d038f 100644
--- a/Zend/tests/gc_006.phpt
+++ b/Zend/tests/gc_006.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 006: Simple array-object cycle
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = new stdClass();
@@ -10,18 +12,12 @@ unset($a);
var_dump(gc_collect_cycles());
echo "ok\n"
?>
---EXPECT--
-object(stdClass)#1 (1) {
+--EXPECTF--
+object(stdClass)#%d (1) {
["a"]=>
array(1) {
[0]=>
- &object(stdClass)#1 (1) {
- ["a"]=>
- array(1) {
- [0]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
int(2)
diff --git a/Zend/tests/gc_007.phpt b/Zend/tests/gc_007.phpt
index 4baa5e666..8601ea43b 100644
--- a/Zend/tests/gc_007.phpt
+++ b/Zend/tests/gc_007.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 007: Unreferensed array cycle
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = array(array());
@@ -15,10 +17,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
+ *RECURSION*
}
}
int(0)
diff --git a/Zend/tests/gc_008.phpt b/Zend/tests/gc_008.phpt
index b62504bd2..289d581d6 100644
--- a/Zend/tests/gc_008.phpt
+++ b/Zend/tests/gc_008.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 008: Unreferensed object cycle
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = new stdClass();
@@ -11,13 +13,10 @@ unset($a);
var_dump(gc_collect_cycles());
echo "ok\n"
?>
---EXPECT--
-object(stdClass)#2 (1) {
+--EXPECTF--
+object(stdClass)#%d (1) {
["a"]=>
- object(stdClass)#2 (1) {
- ["a"]=>
- *RECURSION*
- }
+ *RECURSION*
}
int(0)
int(1)
diff --git a/Zend/tests/gc_009.phpt b/Zend/tests/gc_009.phpt
index 02ee1ae03..263d31f45 100644
--- a/Zend/tests/gc_009.phpt
+++ b/Zend/tests/gc_009.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 009: Unreferensed array-object cycle
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = array();
@@ -12,18 +14,12 @@ unset($a);
var_dump(gc_collect_cycles());
echo "ok\n"
?>
---EXPECT--
-object(stdClass)#1 (1) {
+--EXPECTF--
+object(stdClass)#%d (1) {
["a"]=>
array(1) {
[0]=>
- &object(stdClass)#1 (1) {
- ["a"]=>
- array(1) {
- [0]=>
- *RECURSION*
- }
- }
+ *RECURSION*
}
}
int(0)
diff --git a/Zend/tests/gc_010.phpt b/Zend/tests/gc_010.phpt
index d39ef8a09..af2dda3fe 100644
--- a/Zend/tests/gc_010.phpt
+++ b/Zend/tests/gc_010.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 010: Cycle with reference to $GLOBALS
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = array();
@@ -15,10 +17,7 @@ array(1) {
[0]=>
&array(1) {
[0]=>
- &array(1) {
- [0]=>
- *RECURSION*
- }
+ *RECURSION*
}
}
int(1)
diff --git a/Zend/tests/gc_011.phpt b/Zend/tests/gc_011.phpt
index 97819be23..9c4cc2cc0 100644
--- a/Zend/tests/gc_011.phpt
+++ b/Zend/tests/gc_011.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 011: GC and destructors
+--INI--
+zend.enable_gc=1
--FILE--
<?php
class Foo {
@@ -15,13 +17,10 @@ unset($a);
var_dump(gc_collect_cycles());
echo "ok\n"
?>
---EXPECT--
-object(Foo)#1 (1) {
+--EXPECTF--
+object(Foo)#%d (1) {
["a"]=>
- object(Foo)#1 (1) {
- ["a"]=>
- *RECURSION*
- }
+ *RECURSION*
}
__destruct
int(1)
diff --git a/Zend/tests/gc_012.phpt b/Zend/tests/gc_012.phpt
index eff76ef31..f6c853897 100644
--- a/Zend/tests/gc_012.phpt
+++ b/Zend/tests/gc_012.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 012: collection of many loops at once
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a=array();
diff --git a/Zend/tests/gc_013.phpt b/Zend/tests/gc_013.phpt
index ddfa0e6ba..9209ca2b4 100644
--- a/Zend/tests/gc_013.phpt
+++ b/Zend/tests/gc_013.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 013: Too many cycles in one array
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = array();
diff --git a/Zend/tests/gc_014.phpt b/Zend/tests/gc_014.phpt
index 8167880f9..9f43fc850 100644
--- a/Zend/tests/gc_014.phpt
+++ b/Zend/tests/gc_014.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 014: Too many cycles in one object
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = new stdClass();
diff --git a/Zend/tests/gc_015.phpt b/Zend/tests/gc_015.phpt
index be3c5eb9d..df85836ed 100644
--- a/Zend/tests/gc_015.phpt
+++ b/Zend/tests/gc_015.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 015: Object as root of cycle
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = new stdClass();
diff --git a/Zend/tests/gc_016.phpt b/Zend/tests/gc_016.phpt
index 6d6a36307..f1e14dab1 100644
--- a/Zend/tests/gc_016.phpt
+++ b/Zend/tests/gc_016.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 016: nested GC calls
+--INI--
+zend.enable_gc=1
--FILE--
<?php
class Foo {
diff --git a/Zend/tests/gc_017.phpt b/Zend/tests/gc_017.phpt
index 9df04e280..50be61025 100644
--- a/Zend/tests/gc_017.phpt
+++ b/Zend/tests/gc_017.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 017: GC and destructors with unset
+--INI--
+zend.enable_gc=1
--FILE--
<?php
class Node {
diff --git a/Zend/tests/gc_018.phpt b/Zend/tests/gc_018.phpt
index c202d8cdc..ef797ae6d 100644
--- a/Zend/tests/gc_018.phpt
+++ b/Zend/tests/gc_018.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 018: GC detach with assign
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = array(array());
diff --git a/Zend/tests/gc_019.phpt b/Zend/tests/gc_019.phpt
index 12400d2f0..17d0f73be 100644
--- a/Zend/tests/gc_019.phpt
+++ b/Zend/tests/gc_019.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 019: GC detach with assign by reference
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = array(array());
diff --git a/Zend/tests/gc_020.phpt b/Zend/tests/gc_020.phpt
index 76e8aff9a..8f22e1b4b 100644
--- a/Zend/tests/gc_020.phpt
+++ b/Zend/tests/gc_020.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 020: GC detach reference with assign
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = array();
diff --git a/Zend/tests/gc_021.phpt b/Zend/tests/gc_021.phpt
index 4e6c75094..3db702ac5 100644
--- a/Zend/tests/gc_021.phpt
+++ b/Zend/tests/gc_021.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 021: GC detach reference with assign by reference
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = array();
diff --git a/Zend/tests/gc_022.phpt b/Zend/tests/gc_022.phpt
index 0418bf9a0..5d7bb8494 100644
--- a/Zend/tests/gc_022.phpt
+++ b/Zend/tests/gc_022.phpt
@@ -2,6 +2,7 @@
GC 022: GC detach reference in executor's PZVAL_UNLOCK()
--INI--
error_reporting=0
+zend.enable_gc=1
--FILE--
<?php
$a = array(array());
diff --git a/Zend/tests/gc_023.phpt b/Zend/tests/gc_023.phpt
index 3c0580129..6d6e1e637 100644
--- a/Zend/tests/gc_023.phpt
+++ b/Zend/tests/gc_023.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 023: Root buffer overflow (automatic collection)
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a=array();
diff --git a/Zend/tests/gc_024.phpt b/Zend/tests/gc_024.phpt
index ee734d628..a139e95da 100644
--- a/Zend/tests/gc_024.phpt
+++ b/Zend/tests/gc_024.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 024: GC and objects with non-standard handlers
+--INI--
+zend.enable_gc=1
--SKIPIF--
<?php if (!extension_loaded("spl")) print "skip"; ?>
--FILE--
diff --git a/Zend/tests/gc_025.phpt b/Zend/tests/gc_025.phpt
index 5ae652725..f838ed307 100644
--- a/Zend/tests/gc_025.phpt
+++ b/Zend/tests/gc_025.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 025: Automatic GC on request shutdown
+--INI--
+zend.enable_gc=1
--FILE--
<?php
$a = array(array());
diff --git a/Zend/tests/gc_027.phpt b/Zend/tests/gc_027.phpt
index 9d2418eb4..d499cc314 100644
--- a/Zend/tests/gc_027.phpt
+++ b/Zend/tests/gc_027.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 027: GC and properties of internal classes
+--INI--
+zend.enable_gc=1
--FILE--
<?php
try {
diff --git a/Zend/tests/gc_028.phpt b/Zend/tests/gc_028.phpt
index 6f330cb60..8dc70fc39 100644
--- a/Zend/tests/gc_028.phpt
+++ b/Zend/tests/gc_028.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 028: GC and destructors
+--INI--
+zend.enable_gc=1
--FILE--
<?php
class Foo {
diff --git a/Zend/tests/gc_029.phpt b/Zend/tests/gc_029.phpt
index ea0660eca..438053414 100644
--- a/Zend/tests/gc_029.phpt
+++ b/Zend/tests/gc_029.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 029: GC and destructors
+--INI--
+zend.enable_gc=1
--FILE--
<?php
class Foo {
diff --git a/Zend/tests/gc_030.phpt b/Zend/tests/gc_030.phpt
index 27db29d98..ef044e0f0 100644
--- a/Zend/tests/gc_030.phpt
+++ b/Zend/tests/gc_030.phpt
@@ -1,5 +1,7 @@
--TEST--
GC 030: GC and exceptions in destructors
+--INI--
+zend.enable_gc=1
--FILE--
<?php
class foo {
@@ -28,4 +30,4 @@ Next exception 'Exception' with message 'foobar' in %sgc_030.php:%d
Stack trace:
#0 %sgc_030.php(%d): foo->__destruct()
#1 {main}
- thrown in %sgc_030.php on line %d \ No newline at end of file
+ thrown in %sgc_030.php on line %d
diff --git a/Zend/tests/ns_063.phpt b/Zend/tests/ns_063.phpt
index 1be000983..dbe34b428 100644
--- a/Zend/tests/ns_063.phpt
+++ b/Zend/tests/ns_063.phpt
@@ -1,5 +1,5 @@
--TEST--
-063: Support for old-style constructors in namesapces
+063: Old-style constructors in namesapces (not supported!)
--FILE--
<?php
namespace Foo;
@@ -9,5 +9,6 @@ class Bar {
}
}
new Bar();
+echo "ok\n";
--EXPECT--
ok
diff --git a/Zend/tests/objects_011.phpt b/Zend/tests/objects_011.phpt
index eb1fc0c1f..c7d1e876f 100644
--- a/Zend/tests/objects_011.phpt
+++ b/Zend/tests/objects_011.phpt
@@ -14,6 +14,5 @@ class test {
echo "Done\n";
?>
---EXPECTF--
-Strict Standards: Redefining already defined constructor for class test in %s on line %d
+--EXPECT--
Done
diff --git a/Zend/tests/objects_020.phpt b/Zend/tests/objects_020.phpt
index b7c709f32..14e34b915 100644
--- a/Zend/tests/objects_020.phpt
+++ b/Zend/tests/objects_020.phpt
@@ -13,18 +13,10 @@ $$test->a->b[] = 2;
var_dump($$test);
?>
---EXPECT--
-object(stdClass)#1 (2) {
+--EXPECTF--
+object(stdClass)#%d (2) {
["a"]=>
- &object(stdClass)#1 (2) {
- ["a"]=>
- *RECURSION*
- ["b"]=>
- array(1) {
- [0]=>
- int(2)
- }
- }
+ *RECURSION*
["b"]=>
array(1) {
[0]=>
diff --git a/Zend/zend.h b/Zend/zend.h
index 3332e7c93..3427b311e 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.h 294459 2010-02-03 20:44:43Z pajoye $ */
+/* $Id: zend.h 293590 2010-01-15 18:26:53Z rasmus $ */
#ifndef ZEND_H
#define ZEND_H
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 6d939e682..cf74a9b7f 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c 293980 2010-01-25 14:02:09Z johannes $ */
+/* $Id: zend_API.c 299395 2010-05-14 23:48:03Z felipe $ */
#include "zend.h"
#include "zend_execute.h"
@@ -251,22 +251,18 @@ ZEND_API int zend_get_object_classname(const zval *object, char **class_name, ze
}
/* }}} */
-static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TSRMLS_DC) /* {{{ */
+static int parse_arg_object_to_string(zval **arg TSRMLS_DC) /* {{{ */
{
if (Z_OBJ_HANDLER_PP(arg, cast_object)) {
SEPARATE_ZVAL_IF_NOT_REF(arg);
- if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, type TSRMLS_CC) == SUCCESS) {
- *pl = Z_STRLEN_PP(arg);
- *p = Z_STRVAL_PP(arg);
+ if (Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) {
return SUCCESS;
}
}
/* Standard PHP objects */
if (Z_OBJ_HT_PP(arg) == &std_object_handlers || !Z_OBJ_HANDLER_PP(arg, cast_object)) {
SEPARATE_ZVAL_IF_NOT_REF(arg);
- if (zend_std_cast_object_tostring(*arg, *arg, type TSRMLS_CC) == SUCCESS) {
- *pl = Z_STRLEN_PP(arg);
- *p = Z_STRVAL_PP(arg);
+ if (zend_std_cast_object_tostring(*arg, *arg, IS_STRING TSRMLS_CC) == SUCCESS) {
return SUCCESS;
}
}
@@ -281,8 +277,6 @@ static int parse_arg_object_to_string(zval **arg, char **p, int *pl, int type TS
if (!use_copy) {
ZVAL_ZVAL(*arg, z, 1, 1);
}
- *pl = Z_STRLEN_PP(arg);
- *p = Z_STRVAL_PP(arg);
return SUCCESS;
}
zval_ptr_dtor(&z);
@@ -418,15 +412,17 @@ static char *zend_parse_arg_impl(int arg_num, zval **arg, va_list *va, char **sp
case IS_DOUBLE:
case IS_BOOL:
convert_to_string_ex(arg);
+ if (UNEXPECTED(Z_ISREF_PP(arg) != 0)) {
+ /* it's dangerous to return pointers to string
+ buffer of referenced variable, because it can
+ be clobbered throug magic callbacks */
+ SEPARATE_ZVAL(arg);
+ }
*p = Z_STRVAL_PP(arg);
*pl = Z_STRLEN_PP(arg);
break;
case IS_OBJECT:
- if (parse_arg_object_to_string(arg, p, pl, IS_STRING TSRMLS_CC) == SUCCESS) {
- break;
- }
-
case IS_ARRAY:
case IS_RESOURCE:
default:
@@ -680,7 +676,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
int max_num_args = 0;
int post_varargs = 0;
zval **arg;
- int arg_count;
+ int arg_count = (int)(zend_uintptr_t) *(zend_vm_stack_top(TSRMLS_C) - 1);
int quiet = flags & ZEND_PARSE_PARAMS_QUIET;
zend_bool have_varargs = 0;
zval ****varargs = NULL;
@@ -689,14 +685,21 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
for (spec_walk = type_spec; *spec_walk; spec_walk++) {
c = *spec_walk;
switch (c) {
+ case 's':
+ if (max_num_args < arg_count) {
+ arg = (zval **) (zend_vm_stack_top(TSRMLS_C) - 1 - (arg_count - max_num_args));
+ if (Z_TYPE_PP(arg) == IS_OBJECT) {
+ parse_arg_object_to_string(arg TSRMLS_CC);
+ }
+ }
+ /* break missing intentionally */
case 'l': case 'd':
- case 's': case 'b':
+ case 'H': case 'b':
case 'r': case 'a':
case 'o': case 'O':
case 'z': case 'Z':
case 'C': case 'h':
case 'f': case 'A':
- case 'H':
max_num_args++;
break;
@@ -718,7 +721,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
zend_error(E_WARNING, "%s%s%s(): only one varargs specifier (* or +) is permitted",
class_name,
class_name[0] ? "::" : "",
- get_active_function_name(TSRMLS_C));
+ active_function->common.function_name);
}
return FAILURE;
}
@@ -738,7 +741,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
zend_error(E_WARNING, "%s%s%s(): bad type specifier while parsing parameters",
class_name,
class_name[0] ? "::" : "",
- get_active_function_name(TSRMLS_C));
+ active_function->common.function_name);
}
return FAILURE;
}
@@ -761,7 +764,7 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
zend_error(E_WARNING, "%s%s%s() expects %s %d parameter%s, %d given",
class_name,
class_name[0] ? "::" : "",
- get_active_function_name(TSRMLS_C),
+ active_function->common.function_name,
min_num_args == max_num_args ? "exactly" : num_args < min_num_args ? "at least" : "at most",
num_args < min_num_args ? min_num_args : max_num_args,
(num_args < min_num_args ? min_num_args : max_num_args) == 1 ? "" : "s",
@@ -770,8 +773,6 @@ static int zend_parse_va_args(int num_args, char *type_spec, va_list *va, int fl
return FAILURE;
}
- arg_count = (int)(zend_uintptr_t) *(zend_vm_stack_top(TSRMLS_C) - 1);
-
if (num_args > arg_count) {
zend_error(E_WARNING, "%s(): could not obtain parameters for parsing",
get_active_function_name(TSRMLS_C));
@@ -1607,7 +1608,6 @@ ZEND_API int zend_startup_module_ex(zend_module_entry *module TSRMLS_DC) /* {{{
}
#endif
}
-
if (module->module_startup_func) {
EG(current_module) = module;
if (module->module_startup_func(module->type, module->module_number TSRMLS_CC)==FAILURE) {
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index dac54543d..cc7c54d08 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.c 294518 2010-02-04 09:48:02Z pajoye $ */
+/* $Id: zend_alloc.c 301262 2010-07-14 10:27:08Z dmitry $ */
#include "zend.h"
#include "zend_alloc.h"
@@ -1115,7 +1115,7 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_mem_handlers *handlers,
mm_heap->large_free_buckets[i]->parent = &mm_heap->large_free_buckets[i];
}
}
- mm_heap->rest_buckets[0]->next_free_block = mm_heap->rest_buckets[1]->prev_free_block = ZEND_MM_REST_BUCKET(mm_heap);
+ mm_heap->rest_buckets[0] = mm_heap->rest_buckets[1] = ZEND_MM_REST_BUCKET(mm_heap);
free(heap);
heap = mm_heap;
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 93dbe49ab..320c2bc74 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_builtin_functions.c 294034 2010-01-25 23:41:18Z johannes $ */
+/* $Id: zend_builtin_functions.c 300392 2010-06-11 23:20:13Z felipe $ */
#include "zend.h"
#include "zend_API.h"
@@ -26,6 +26,7 @@
#include "zend_ini.h"
#include "zend_exceptions.h"
#include "zend_extensions.h"
+#include "zend_closures.h"
#undef ZEND_TEST_EXCEPTIONS
@@ -179,7 +180,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_alias, 0, 0, 2)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_trigger_error, 0, 0, 1)
- ZEND_ARG_INFO(0, messsage)
+ ZEND_ARG_INFO(0, message)
ZEND_ARG_INFO(0, error_type)
ZEND_END_ARG_INFO()
@@ -1098,22 +1099,29 @@ ZEND_FUNCTION(method_exists)
RETURN_TRUE;
} else {
union _zend_function *func = NULL;
- efree(lcname);
if (Z_TYPE_P(klass) == IS_OBJECT
&& Z_OBJ_HT_P(klass)->get_method != NULL
&& (func = Z_OBJ_HT_P(klass)->get_method(&klass, method_name, method_len TSRMLS_CC)) != NULL
) {
if (func->type == ZEND_INTERNAL_FUNCTION
- && ((zend_internal_function*)func)->handler == zend_std_call_user_call
+ && (func->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER) != 0
) {
+ /* Returns true to the fake Closure's __invoke */
+ RETVAL_BOOL((func->common.scope == zend_ce_closure
+ && (method_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1)
+ && memcmp(lcname, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) == 0) ? 1 : 0);
+
+ efree(lcname);
efree(((zend_internal_function*)func)->function_name);
efree(func);
- RETURN_FALSE;
+ return;
}
+ efree(lcname);
RETURN_TRUE;
}
}
+ efree(lcname);
RETURN_FALSE;
}
/* }}} */
@@ -1151,10 +1159,8 @@ ZEND_FUNCTION(property_exists)
}
h = zend_get_hash_value(property, property_len+1);
- if (zend_hash_quick_find(&ce->properties_info, property, property_len+1, h, (void **) &property_info) == SUCCESS) {
- if (property_info->flags & ZEND_ACC_SHADOW) {
- RETURN_FALSE;
- }
+ if (zend_hash_quick_find(&ce->properties_info, property, property_len+1, h, (void **) &property_info) == SUCCESS
+ && (property_info->flags & ZEND_ACC_SHADOW) == 0) {
RETURN_TRUE;
}
@@ -1386,7 +1392,7 @@ ZEND_FUNCTION(get_included_files)
/* }}} */
-/* {{{ proto void trigger_error(string messsage [, int error_type])
+/* {{{ proto void trigger_error(string message [, int error_type])
Generates a user-level error/warning/notice message */
ZEND_FUNCTION(trigger_error)
{
@@ -2150,7 +2156,9 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
while (prev) {
if (prev->function_state.function &&
- prev->function_state.function->common.type != ZEND_USER_FUNCTION) {
+ prev->function_state.function->common.type != ZEND_USER_FUNCTION &&
+ !(prev->function_state.function->common.type == ZEND_INTERNAL_FUNCTION &&
+ (prev->function_state.function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER))) {
break;
}
if (prev->op_array) {
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 791a08ed3..8b8a84e68 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_compile.c 300817 2010-06-28 16:37:57Z felipe $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -1270,25 +1270,14 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
}
}
} else {
- char *short_class_name;
- int short_class_name_length;
- char *short_class_lcname;
-
- if ((short_class_name = zend_memrchr(CG(active_class_entry)->name, '\\', CG(active_class_entry)->name_length))) {
- short_class_name_length = CG(active_class_entry)->name_length - (short_class_name - CG(active_class_entry)->name) - 1;
- ++short_class_name;
- } else {
- short_class_name = CG(active_class_entry)->name;
- short_class_name_length = CG(active_class_entry)->name_length;
- }
- short_class_lcname = do_alloca(short_class_name_length + 1, use_heap);
- zend_str_tolower_copy(short_class_lcname, short_class_name, short_class_name_length);
+ char *class_lcname;
+
+ class_lcname = do_alloca(CG(active_class_entry)->name_length + 1, use_heap);
+ zend_str_tolower_copy(class_lcname, CG(active_class_entry)->name, CG(active_class_entry)->name_length);
/* Improve after RC: cache the lowercase class name */
- if ((short_class_name_length == name_len) && (!memcmp(short_class_lcname, lcname, name_len))) {
- if (CG(active_class_entry)->constructor) {
- zend_error(E_STRICT, "Redefining already defined constructor for class %s", CG(active_class_entry)->name);
- } else {
+ if ((CG(active_class_entry)->name_length == name_len) && (!memcmp(class_lcname, lcname, name_len))) {
+ if (!CG(active_class_entry)->constructor) {
CG(active_class_entry)->constructor = (zend_function *) CG(active_op_array);
}
} else if ((name_len == sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)))) {
@@ -1338,7 +1327,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
} else if (!(fn_flags & ZEND_ACC_STATIC)) {
CG(active_op_array)->fn_flags |= ZEND_ACC_ALLOW_STATIC;
}
- free_alloca(short_class_lcname, use_heap);
+ free_alloca(class_lcname, use_heap);
}
efree(lcname);
@@ -2543,13 +2532,16 @@ static zend_bool zend_do_perform_implementation_check(const zend_function *fe, c
{
zend_uint i;
- /* If it's a user function then arg_info == NULL means we don't have any parameters but we still need to do the arg number checks. We are only willing to ignore this for internal functions because extensions don't always define arg_info. */
+ /* If it's a user function then arg_info == NULL means we don't have any parameters but
+ * we still need to do the arg number checks. We are only willing to ignore this for internal
+ * functions because extensions don't always define arg_info.
+ */
if (!proto || (!proto->common.arg_info && proto->common.type != ZEND_USER_FUNCTION)) {
return 1;
}
/* Checks for constructors only if they are declared in an interface */
- if ((fe->common.fn_flags & ZEND_ACC_CTOR) && !(proto->common.scope->ce_flags & ZEND_ACC_INTERFACE)) {
+ if ((fe->common.fn_flags & ZEND_ACC_CTOR) && (proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0) {
return 1;
}
diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h
index 6b24d09b7..ac9b31b61 100644
--- a/Zend/zend_compile.h
+++ b/Zend/zend_compile.h
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.h 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_compile.h 300345 2010-06-10 09:13:22Z dmitry $ */
#ifndef ZEND_COMPILE_H
#define ZEND_COMPILE_H
@@ -687,9 +687,9 @@ int zendlex(znode *zendlval TSRMLS_DC);
#define ZEND_CT (1<<0)
#define ZEND_RT (1<<1)
-#define ZEND_FETCH_STANDARD 0
-#define ZEND_FETCH_ADD_LOCK (1<<0)
-#define ZEND_FETCH_MAKE_REF (1<<1)
+#define ZEND_FETCH_STANDARD 0x00000000
+#define ZEND_FETCH_ADD_LOCK 0x08000000
+#define ZEND_FETCH_MAKE_REF 0x04000000
#define ZEND_FE_FETCH_BYREF 1
#define ZEND_FE_FETCH_WITH_KEY 2
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index e20312ed4..0573bb37c 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c 294505 2010-02-04 09:13:14Z pajoye $ */
+/* $Id: zend_execute.c 298213 2010-04-20 12:30:35Z dmitry $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -708,6 +708,7 @@ static inline zval* zend_assign_to_variable(zval **variable_ptr_ptr, zval *value
return variable_ptr;
}
} else { /* we need to split */
+ GC_ZVAL_CHECK_POSSIBLE_ROOT(*variable_ptr_ptr);
if (!is_tmp_var) {
if (PZVAL_IS_REF(value) && Z_REFCOUNT_P(value) > 0) {
ALLOC_ZVAL(variable_ptr);
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 6ea325f8e..fdcb56894 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.h 294526 2010-02-04 10:21:05Z pajoye $ */
+/* $Id: zend_execute.h 299766 2010-05-26 00:00:58Z felipe $ */
#ifndef ZEND_EXECUTE_H
#define ZEND_EXECUTE_H
@@ -135,6 +135,8 @@ static inline int i_zend_is_true(zval *op)
}
ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC);
+ZEND_API int zval_update_constant_inline_change(zval **pp, void *arg TSRMLS_DC);
+ZEND_API int zval_update_constant_no_inline_change(zval **pp, void *arg TSRMLS_DC);
ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC);
/* dedicated Zend executor functions - do not use! */
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 849391bef..6e6a2caa3 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute_API.c 294505 2010-02-04 09:13:14Z pajoye $ */
+/* $Id: zend_execute_API.c 299766 2010-05-26 00:00:58Z felipe $ */
#include <stdio.h>
#include <signal.h>
@@ -411,6 +411,10 @@ ZEND_API char *zend_get_executed_filename(TSRMLS_D) /* {{{ */
ZEND_API uint zend_get_executed_lineno(TSRMLS_D) /* {{{ */
{
+ if(EG(exception) && EG(opline_ptr) && active_opline->opcode == ZEND_HANDLE_EXCEPTION &&
+ active_opline->lineno == 0 && EG(opline_before_exception)) {
+ return EG(opline_before_exception)->lineno;
+ }
if (EG(opline_ptr)) {
return active_opline->lineno;
} else {
@@ -680,13 +684,25 @@ ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *sco
}
zval_dtor(&const_value);
}
- zend_hash_apply_with_argument(Z_ARRVAL_P(p), (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
+ zend_hash_apply_with_argument(Z_ARRVAL_P(p), (apply_func_arg_t) zval_update_constant_inline_change, (void *) scope TSRMLS_CC);
zend_hash_internal_pointer_reset(Z_ARRVAL_P(p));
}
return 0;
}
/* }}} */
+ZEND_API int zval_update_constant_inline_change(zval **pp, void *scope TSRMLS_DC) /* {{{ */
+{
+ return zval_update_constant_ex(pp, (void*)1, scope TSRMLS_CC);
+}
+/* }}} */
+
+ZEND_API int zval_update_constant_no_inline_change(zval **pp, void *scope TSRMLS_DC) /* {{{ */
+{
+ return zval_update_constant_ex(pp, (void*)0, scope TSRMLS_CC);
+}
+/* }}} */
+
ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC) /* {{{ */
{
return zval_update_constant_ex(pp, arg, NULL TSRMLS_CC);
@@ -1076,7 +1092,11 @@ ZEND_API int zend_lookup_class_ex(const char *name, int name_length, int use_aut
ALLOC_ZVAL(class_name_ptr);
INIT_PZVAL(class_name_ptr);
- ZVAL_STRINGL(class_name_ptr, name, name_length, 1);
+ if (name[0] == '\\') {
+ ZVAL_STRINGL(class_name_ptr, name+1, name_length-1, 1);
+ } else {
+ ZVAL_STRINGL(class_name_ptr, name, name_length, 1);
+ }
args[0] = &class_name_ptr;
diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c
index cbe6b86a3..1b26d6c4e 100644
--- a/Zend/zend_extensions.c
+++ b/Zend/zend_extensions.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_extensions.c 294505 2010-02-04 09:13:14Z pajoye $ */
+/* $Id: zend_extensions.c 293985 2010-01-25 14:47:19Z pajoye $ */
#include "zend_extensions.h"
diff --git a/Zend/zend_float.h b/Zend/zend_float.h
index 9fdb469ec..2bcae3bcc 100644
--- a/Zend/zend_float.h
+++ b/Zend/zend_float.h
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_float.h 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_float.h 301274 2010-07-15 00:13:20Z pajoye $ */
#ifndef ZEND_FLOAT_H
#define ZEND_FLOAT_H
@@ -78,7 +78,9 @@ extern ZEND_API void zend_ensure_fpu_mode(TSRMLS_D);
# define HAVE__CONTROLFP
# endif /* MSC_VER >= 1500 */
/* Tell MSVC optimizer that we access FP environment */
-# pragma fenv_access (on)
+# if _MSC_VER >= 1500
+# pragma fenv_access (on)
+# endif
#endif /* _MSC_VER */
#ifdef HAVE__CONTROLFP_S
diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c
index 6db682ef0..16c31ea1e 100644
--- a/Zend/zend_gc.c
+++ b/Zend/zend_gc.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_gc.c 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_gc.c 297307 2010-04-01 22:54:03Z stas $ */
#include "zend.h"
#include "zend_API.h"
@@ -282,7 +282,11 @@ tail_call:
GC_SET_BLACK(obj->buffered);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- p = Z_OBJPROP_P(pz)->pListHead;
+ HashTable *props = Z_OBJPROP_P(pz);
+ if(!props) {
+ return;
+ }
+ p = props->pListHead;
}
}
} else if (Z_TYPE_P(pz) == IS_ARRAY) {
@@ -313,7 +317,11 @@ static void zobj_scan_black(struct _store_object *obj, zval *pz TSRMLS_DC)
GC_SET_BLACK(obj->buffered);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- p = Z_OBJPROP_P(pz)->pListHead;
+ HashTable *props = Z_OBJPROP_P(pz);
+ if(!props) {
+ return;
+ }
+ p = props->pListHead;
while (p != NULL) {
pz = *(zval**)p->pData;
if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) {
@@ -346,7 +354,11 @@ tail_call:
GC_SET_COLOR(obj->buffered, GC_GREY);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- p = Z_OBJPROP_P(pz)->pListHead;
+ HashTable *props = Z_OBJPROP_P(pz);
+ if(!props) {
+ return;
+ }
+ p = props->pListHead;
}
}
} else if (Z_TYPE_P(pz) == IS_ARRAY) {
@@ -380,7 +392,11 @@ static void zobj_mark_grey(struct _store_object *obj, zval *pz TSRMLS_DC)
GC_SET_COLOR(obj->buffered, GC_GREY);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- p = Z_OBJPROP_P(pz)->pListHead;
+ HashTable *props = Z_OBJPROP_P(pz);
+ if(!props) {
+ return;
+ }
+ p = props->pListHead;
while (p != NULL) {
pz = *(zval**)p->pData;
if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) {
@@ -445,7 +461,11 @@ tail_call:
GC_SET_COLOR(obj->buffered, GC_WHITE);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- p = Z_OBJPROP_P(pz)->pListHead;
+ HashTable *props = Z_OBJPROP_P(pz);
+ if(!props) {
+ return 0;
+ }
+ p = props->pListHead;
}
}
}
@@ -484,7 +504,11 @@ static void zobj_scan(zval *pz TSRMLS_DC)
GC_SET_COLOR(obj->buffered, GC_WHITE);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- p = Z_OBJPROP_P(pz)->pListHead;
+ HashTable *props = Z_OBJPROP_P(pz);
+ if(!props) {
+ return;
+ }
+ p = props->pListHead;
while (p != NULL) {
zval_scan(*(zval**)p->pData TSRMLS_CC);
p = p->pListNext;
@@ -531,7 +555,11 @@ tail_call:
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- p = Z_OBJPROP_P(pz)->pListHead;
+ HashTable *props = Z_OBJPROP_P(pz);
+ if(!props) {
+ return;
+ }
+ p = props->pListHead;
}
}
} else {
@@ -572,7 +600,11 @@ static void zobj_collect_white(zval *pz TSRMLS_DC)
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
Z_OBJ_HANDLER_P(pz, get_properties) != NULL)) {
- p = Z_OBJPROP_P(pz)->pListHead;
+ HashTable *props = Z_OBJPROP_P(pz);
+ if(!props) {
+ return;
+ }
+ p = props->pListHead;
while (p != NULL) {
pz = *(zval**)p->pData;
if (Z_TYPE_P(pz) != IS_ARRAY || Z_ARRVAL_P(pz) != &EG(symbol_table)) {
diff --git a/Zend/zend_globals.h b/Zend/zend_globals.h
index f1f6c50b8..4577969d6 100644
--- a/Zend/zend_globals.h
+++ b/Zend/zend_globals.h
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_globals.h 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_globals.h 300854 2010-06-29 11:37:13Z felipe $ */
#ifndef ZEND_GLOBALS_H
#define ZEND_GLOBALS_H
diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c
index 70d6bf71e..854ac2b3e 100644
--- a/Zend/zend_hash.c
+++ b/Zend/zend_hash.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_hash.c 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_hash.c 298914 2010-05-03 16:36:04Z felipe $ */
#include "zend.h"
@@ -1455,7 +1455,7 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t co
return 1;
}
} else { /* string index */
- if (zend_hash_find(ht2, p1->arKey, p1->nKeyLength, &pData2)==FAILURE) {
+ if (zend_hash_quick_find(ht2, p1->arKey, p1->nKeyLength, p1->h, &pData2)==FAILURE) {
HASH_UNPROTECT_RECURSION(ht1);
HASH_UNPROTECT_RECURSION(ht2);
return 1;
diff --git a/Zend/zend_highlight.c b/Zend/zend_highlight.c
index 769456540..5229877c6 100644
--- a/Zend/zend_highlight.c
+++ b/Zend/zend_highlight.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_highlight.c 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_highlight.c 296107 2010-03-12 10:28:59Z jani $ */
#include "zend.h"
#include <zend_language_parser.h>
diff --git a/Zend/zend_indent.c b/Zend/zend_indent.c
index 7542e4897..11fcbce1b 100644
--- a/Zend/zend_indent.c
+++ b/Zend/zend_indent.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_indent.c 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_indent.c 296107 2010-03-12 10:28:59Z jani $ */
/* This indenter doesn't really work, it's here for no particular reason. */
diff --git a/Zend/zend_ini_parser.c b/Zend/zend_ini_parser.c
index d4e4084f8..c4163481f 100644
--- a/Zend/zend_ini_parser.c
+++ b/Zend/zend_ini_parser.c
@@ -131,7 +131,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini_parser.y 293154 2010-01-05 20:40:23Z sebastian $ */
+/* $Id: zend_ini_parser.y 300737 2010-06-24 22:32:42Z felipe $ */
#define DEBUG_CFG_PARSER 0
@@ -605,16 +605,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 80
+#define YYLAST 109
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 43
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 11
+#define YYNNTS 13
/* YYNRULES -- Number of rules. */
-#define YYNRULES 37
+#define YYNRULES 48
/* YYNRULES -- Number of states. */
-#define YYNSTATES 54
+#define YYNSTATES 69
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -663,8 +663,9 @@ static const yytype_uint8 yyprhs[] =
{
0, 0, 3, 6, 7, 11, 15, 21, 23, 25,
27, 28, 30, 32, 34, 36, 38, 39, 42, 45,
- 46, 48, 50, 54, 57, 60, 65, 67, 71, 75,
- 78, 81, 85, 89, 91, 93, 95, 97
+ 46, 48, 50, 54, 57, 60, 65, 67, 69, 73,
+ 76, 79, 84, 86, 90, 94, 97, 100, 104, 108,
+ 110, 112, 114, 116, 118, 120, 122, 124, 126
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
@@ -672,14 +673,17 @@ static const yytype_int8 yyrhs[] =
{
44, 0, -1, 44, 45, -1, -1, 3, 46, 40,
-1, 9, 17, 47, -1, 10, 48, 40, 17, 47,
- -1, 9, -1, 16, -1, 50, -1, -1, 51, -1,
- 14, -1, 15, -1, 16, -1, 50, -1, -1, 49,
- 52, -1, 49, 13, -1, -1, 52, -1, 53, -1,
- 21, 49, 21, -1, 50, 52, -1, 50, 53, -1,
- 50, 21, 49, 21, -1, 50, -1, 51, 37, 51,
- -1, 51, 38, 51, -1, 30, 51, -1, 39, 51,
- -1, 41, 51, 42, -1, 11, 12, 36, -1, 5,
- -1, 4, -1, 6, -1, 7, -1, 8, -1
+ -1, 9, -1, 16, -1, 50, -1, -1, 52, -1,
+ 14, -1, 15, -1, 16, -1, 51, -1, -1, 49,
+ 53, -1, 49, 13, -1, -1, 53, -1, 54, -1,
+ 21, 49, 21, -1, 50, 53, -1, 50, 54, -1,
+ 50, 21, 49, 21, -1, 53, -1, 55, -1, 21,
+ 49, 21, -1, 51, 53, -1, 51, 55, -1, 51,
+ 21, 49, 21, -1, 51, -1, 52, 37, 52, -1,
+ 52, 38, 52, -1, 30, 52, -1, 39, 52, -1,
+ 41, 52, 42, -1, 11, 12, 36, -1, 5, -1,
+ 4, -1, 6, -1, 7, -1, 8, -1, 5, -1,
+ 4, -1, 6, -1, 7, -1, 8, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
@@ -688,7 +692,8 @@ static const yytype_uint16 yyrline[] =
0, 273, 273, 274, 278, 285, 293, 302, 303, 307,
308, 312, 313, 314, 315, 319, 320, 324, 325, 326,
330, 331, 332, 333, 334, 335, 339, 340, 341, 342,
- 343, 344, 348, 352, 353, 354, 355, 356
+ 343, 344, 348, 349, 350, 351, 352, 353, 357, 361,
+ 362, 363, 364, 365, 369, 370, 371, 372, 373
};
#endif
@@ -704,8 +709,9 @@ static const char *const yytname[] =
"'^'", "'+'", "'-'", "'/'", "'*'", "'%'", "'$'", "'~'", "'<'", "'>'",
"'?'", "'@'", "'{'", "'}'", "'|'", "'&'", "'!'", "']'", "'('", "')'",
"$accept", "statement_list", "statement", "section_string_or_value",
- "string_or_value", "option_offset", "encapsed_list", "var_string_list",
- "expr", "cfg_var_ref", "constant_string", 0
+ "string_or_value", "option_offset", "encapsed_list",
+ "var_string_list_section", "var_string_list", "expr", "cfg_var_ref",
+ "constant_literal", "constant_string", 0
};
#endif
@@ -728,7 +734,8 @@ static const yytype_uint8 yyr1[] =
0, 43, 44, 44, 45, 45, 45, 45, 45, 46,
46, 47, 47, 47, 47, 48, 48, 49, 49, 49,
50, 50, 50, 50, 50, 50, 51, 51, 51, 51,
- 51, 51, 52, 53, 53, 53, 53, 53
+ 51, 51, 52, 52, 52, 52, 52, 52, 53, 54,
+ 54, 54, 54, 54, 55, 55, 55, 55, 55
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -736,8 +743,9 @@ static const yytype_uint8 yyr2[] =
{
0, 2, 2, 0, 3, 3, 5, 1, 1, 1,
0, 1, 1, 1, 1, 1, 0, 2, 2, 0,
- 1, 1, 3, 2, 2, 4, 1, 3, 3, 2,
- 2, 3, 3, 1, 1, 1, 1, 1
+ 1, 1, 3, 2, 2, 4, 1, 1, 3, 2,
+ 2, 4, 1, 3, 3, 2, 2, 3, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -745,39 +753,41 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 3, 0, 1, 10, 7, 16, 8, 2, 34, 33,
- 35, 36, 37, 0, 19, 0, 9, 20, 21, 0,
- 0, 15, 0, 0, 4, 19, 23, 24, 12, 13,
- 14, 0, 0, 0, 5, 26, 11, 0, 32, 18,
- 22, 17, 0, 29, 30, 0, 0, 0, 0, 25,
- 31, 27, 28, 6
+ 3, 0, 1, 10, 7, 16, 8, 2, 40, 39,
+ 41, 42, 43, 0, 19, 0, 9, 20, 21, 0,
+ 45, 44, 46, 47, 48, 19, 0, 15, 26, 27,
+ 0, 0, 4, 19, 23, 24, 12, 13, 14, 0,
+ 0, 0, 5, 32, 11, 0, 0, 19, 29, 30,
+ 38, 18, 22, 17, 0, 35, 36, 0, 0, 0,
+ 28, 0, 0, 25, 37, 33, 34, 6, 31
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 1, 7, 15, 34, 20, 23, 35, 36, 17,
- 18
+ -1, 1, 7, 15, 42, 26, 31, 16, 43, 44,
+ 28, 18, 29
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -33
+#define YYPACT_NINF -36
static const yytype_int8 yypact[] =
{
- -33, 60, -33, 38, 3, 38, -33, -33, -33, -33,
- -33, -33, -33, -3, -33, 1, 46, -33, -33, -4,
- 8, 46, 0, 18, -33, -33, -33, -33, -33, -33,
- -33, 17, 17, 17, -33, 46, -32, 44, -33, -33,
- -33, -33, 19, -33, -33, 35, 17, 17, -4, -33,
- -33, -33, -33, -33
+ -36, 93, -36, 39, -5, 65, -36, -36, -36, -36,
+ -36, -36, -36, 8, -36, -18, 73, -36, -36, 0,
+ -36, -36, -36, -36, -36, -36, -15, 84, -36, -36,
+ -9, 41, -36, -36, -36, -36, -36, -36, -36, 27,
+ 27, 27, -36, 84, -35, 42, 12, -36, -36, -36,
+ -36, -36, -36, -36, 54, -36, -36, 45, 27, 27,
+ -36, 0, 86, -36, -36, -36, -36, -36, -36
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -33, -33, -33, -33, 7, -33, 37, 13, 33, -8,
- -2
+ -36, -36, -36, -36, -12, -36, -24, -36, 51, -22,
+ -3, 48, -17
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -787,28 +797,32 @@ static const yytype_int8 yypgoto[] =
#define YYTABLE_NINF -1
static const yytype_uint8 yytable[] =
{
- 8, 9, 10, 11, 12, 46, 47, 13, 26, 22,
- 28, 29, 30, 26, 27, 41, 16, 14, 21, 27,
- 19, 8, 9, 10, 11, 12, 31, 26, 13, 13,
- 13, 39, 39, 27, 41, 32, 38, 33, 14, 40,
- 49, 24, 8, 9, 10, 11, 12, 31, 37, 13,
- 8, 9, 10, 11, 12, 53, 32, 13, 33, 14,
- 2, 48, 42, 3, 43, 44, 45, 25, 0, 4,
- 5, 0, 46, 47, 0, 0, 6, 50, 0, 51,
- 52
+ 17, 45, 58, 59, 20, 21, 22, 23, 24, 54,
+ 49, 13, 19, 34, 36, 37, 38, 55, 56, 57,
+ 30, 25, 32, 62, 48, 46, 49, 50, 53, 61,
+ 39, 20, 21, 22, 23, 24, 65, 66, 13, 40,
+ 48, 41, 53, 8, 9, 10, 11, 12, 25, 67,
+ 13, 53, 13, 13, 51, 51, 27, 39, 0, 53,
+ 14, 0, 52, 60, 35, 13, 40, 51, 41, 20,
+ 21, 22, 23, 24, 0, 63, 13, 8, 9, 10,
+ 11, 12, 58, 59, 13, 0, 25, 64, 20, 21,
+ 22, 23, 24, 2, 33, 13, 3, 13, 0, 51,
+ 0, 0, 4, 5, 0, 47, 0, 68, 0, 6
};
static const yytype_int8 yycheck[] =
{
- 4, 5, 6, 7, 8, 37, 38, 11, 16, 12,
- 14, 15, 16, 21, 16, 23, 3, 21, 5, 21,
- 17, 4, 5, 6, 7, 8, 30, 35, 11, 11,
- 11, 13, 13, 35, 42, 39, 36, 41, 21, 21,
- 21, 40, 4, 5, 6, 7, 8, 30, 40, 11,
- 4, 5, 6, 7, 8, 48, 39, 11, 41, 21,
- 0, 17, 25, 3, 31, 32, 33, 21, -1, 9,
- 10, -1, 37, 38, -1, -1, 16, 42, -1, 46,
- 47
+ 3, 25, 37, 38, 4, 5, 6, 7, 8, 33,
+ 27, 11, 17, 16, 14, 15, 16, 39, 40, 41,
+ 12, 21, 40, 47, 27, 40, 43, 36, 31, 17,
+ 30, 4, 5, 6, 7, 8, 58, 59, 11, 39,
+ 43, 41, 45, 4, 5, 6, 7, 8, 21, 61,
+ 11, 54, 11, 11, 13, 13, 5, 30, -1, 62,
+ 21, -1, 21, 21, 16, 11, 39, 13, 41, 4,
+ 5, 6, 7, 8, -1, 21, 11, 4, 5, 6,
+ 7, 8, 37, 38, 11, -1, 21, 42, 4, 5,
+ 6, 7, 8, 0, 21, 11, 3, 11, -1, 13,
+ -1, -1, 9, 10, -1, 21, -1, 21, -1, 16
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -816,11 +830,12 @@ static const yytype_int8 yycheck[] =
static const yytype_uint8 yystos[] =
{
0, 44, 0, 3, 9, 10, 16, 45, 4, 5,
- 6, 7, 8, 11, 21, 46, 50, 52, 53, 17,
- 48, 50, 12, 49, 40, 21, 52, 53, 14, 15,
- 16, 30, 39, 41, 47, 50, 51, 40, 36, 13,
- 21, 52, 49, 51, 51, 51, 37, 38, 17, 21,
- 42, 51, 51, 47
+ 6, 7, 8, 11, 21, 46, 50, 53, 54, 17,
+ 4, 5, 6, 7, 8, 21, 48, 51, 53, 55,
+ 12, 49, 40, 21, 53, 54, 14, 15, 16, 30,
+ 39, 41, 47, 51, 52, 49, 40, 21, 53, 55,
+ 36, 13, 21, 53, 49, 52, 52, 52, 37, 38,
+ 21, 17, 49, 21, 42, 52, 52, 47, 21
};
#define yyerrok (yyerrstatus = 0)
@@ -1767,56 +1782,111 @@ yyreduce:
case 27:
- { zend_ini_do_op('|', &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 28:
- { zend_ini_do_op('&', &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); }
+ { (yyval) = (yyvsp[(2) - (3)]); }
break;
case 29:
- { zend_ini_do_op('~', &(yyval), &(yyvsp[(2) - (2)]), NULL); }
+ { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); free(Z_STRVAL((yyvsp[(2) - (2)]))); }
break;
case 30:
- { zend_ini_do_op('!', &(yyval), &(yyvsp[(2) - (2)]), NULL); }
+ { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (2)]), &(yyvsp[(2) - (2)])); free(Z_STRVAL((yyvsp[(2) - (2)]))); }
break;
case 31:
- { (yyval) = (yyvsp[(2) - (3)]); }
+ { zend_ini_add_string(&(yyval), &(yyvsp[(1) - (4)]), &(yyvsp[(3) - (4)])); free(Z_STRVAL((yyvsp[(3) - (4)]))); }
break;
case 32:
- { zend_ini_get_var(&(yyval), &(yyvsp[(2) - (3)]) TSRMLS_CC); free(Z_STRVAL((yyvsp[(2) - (3)]))); }
+ { (yyval) = (yyvsp[(1) - (1)]); }
break;
case 33:
- { zend_ini_get_constant(&(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ { zend_ini_do_op('|', &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); }
break;
case 34:
- { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ }
+ { zend_ini_do_op('&', &(yyval), &(yyvsp[(1) - (3)]), &(yyvsp[(3) - (3)])); }
break;
case 35:
- { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/ }
+ { zend_ini_do_op('~', &(yyval), &(yyvsp[(2) - (2)]), NULL); }
break;
case 36:
- { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ }
+ { zend_ini_do_op('!', &(yyval), &(yyvsp[(2) - (2)]), NULL); }
break;
case 37:
+ { (yyval) = (yyvsp[(2) - (3)]); }
+ break;
+
+ case 38:
+
+ { zend_ini_get_var(&(yyval), &(yyvsp[(2) - (3)]) TSRMLS_CC); free(Z_STRVAL((yyvsp[(2) - (3)]))); }
+ break;
+
+ case 39:
+
+ { (yyval) = (yyvsp[(1) - (1)]); }
+ break;
+
+ case 40:
+
+ { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ }
+ break;
+
+ case 41:
+
+ { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/ }
+ break;
+
+ case 42:
+
+ { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ }
+ break;
+
+ case 43:
+
+ { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_WHITESPACE: '%s'\n", Z_STRVAL($1));*/ }
+ break;
+
+ case 44:
+
+ { zend_ini_get_constant(&(yyval), &(yyvsp[(1) - (1)]) TSRMLS_CC); }
+ break;
+
+ case 45:
+
+ { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ }
+ break;
+
+ case 46:
+
+ { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/ }
+ break;
+
+ case 47:
+
+ { (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ }
+ break;
+
+ case 48:
+
{ (yyval) = (yyvsp[(1) - (1)]); /*printf("TC_WHITESPACE: '%s'\n", Z_STRVAL($1));*/ }
break;
diff --git a/Zend/zend_ini_parser.output b/Zend/zend_ini_parser.output
index 608ef14b8..9f7bcda21 100644
--- a/Zend/zend_ini_parser.output
+++ b/Zend/zend_ini_parser.output
@@ -31,7 +31,7 @@ Grammar
6 | TC_LABEL
7 | END_OF_LINE
- 8 section_string_or_value: var_string_list
+ 8 section_string_or_value: var_string_list_section
9 | /* empty */
10 string_or_value: expr
@@ -46,40 +46,53 @@ Grammar
17 | encapsed_list TC_QUOTED_STRING
18 | /* empty */
- 19 var_string_list: cfg_var_ref
- 20 | constant_string
- 21 | '"' encapsed_list '"'
- 22 | var_string_list cfg_var_ref
- 23 | var_string_list constant_string
- 24 | var_string_list '"' encapsed_list '"'
-
- 25 expr: var_string_list
- 26 | expr '|' expr
- 27 | expr '&' expr
- 28 | '~' expr
- 29 | '!' expr
- 30 | '(' expr ')'
-
- 31 cfg_var_ref: TC_DOLLAR_CURLY TC_VARNAME '}'
-
- 32 constant_string: TC_CONSTANT
- 33 | TC_RAW
- 34 | TC_NUMBER
- 35 | TC_STRING
- 36 | TC_WHITESPACE
+ 19 var_string_list_section: cfg_var_ref
+ 20 | constant_literal
+ 21 | '"' encapsed_list '"'
+ 22 | var_string_list_section cfg_var_ref
+ 23 | var_string_list_section constant_literal
+ 24 | var_string_list_section '"' encapsed_list '"'
+
+ 25 var_string_list: cfg_var_ref
+ 26 | constant_string
+ 27 | '"' encapsed_list '"'
+ 28 | var_string_list cfg_var_ref
+ 29 | var_string_list constant_string
+ 30 | var_string_list '"' encapsed_list '"'
+
+ 31 expr: var_string_list
+ 32 | expr '|' expr
+ 33 | expr '&' expr
+ 34 | '~' expr
+ 35 | '!' expr
+ 36 | '(' expr ')'
+
+ 37 cfg_var_ref: TC_DOLLAR_CURLY TC_VARNAME '}'
+
+ 38 constant_literal: TC_CONSTANT
+ 39 | TC_RAW
+ 40 | TC_NUMBER
+ 41 | TC_STRING
+ 42 | TC_WHITESPACE
+
+ 43 constant_string: TC_CONSTANT
+ 44 | TC_RAW
+ 45 | TC_NUMBER
+ 46 | TC_STRING
+ 47 | TC_WHITESPACE
Terminals, with rules where they appear
$end (0) 0
-'!' (33) 29
-'"' (34) 21 24
+'!' (33) 35
+'"' (34) 21 24 27 30
'$' (36)
'%' (37)
-'&' (38) 27
+'&' (38) 33
''' (39)
-'(' (40) 30
-')' (41) 30
+'(' (40) 36
+')' (41) 36
'*' (42)
'+' (43)
',' (44)
@@ -95,20 +108,20 @@ $end (0) 0
']' (93) 3 5
'^' (94)
'{' (123)
-'|' (124) 26
-'}' (125) 31
-'~' (126) 28
+'|' (124) 32
+'}' (125) 37
+'~' (126) 34
error (256)
TC_SECTION (258) 3
-TC_RAW (259) 33
-TC_CONSTANT (260) 32
-TC_NUMBER (261) 34
-TC_STRING (262) 35
-TC_WHITESPACE (263) 36
+TC_RAW (259) 39 44
+TC_CONSTANT (260) 38 43
+TC_NUMBER (261) 40 45
+TC_STRING (262) 41 46
+TC_WHITESPACE (263) 42 47
TC_LABEL (264) 4 6
TC_OFFSET (265) 5
-TC_DOLLAR_CURLY (266) 31
-TC_VARNAME (267) 31
+TC_DOLLAR_CURLY (266) 37
+TC_VARNAME (267) 37
TC_QUOTED_STRING (268) 17
BOOL_TRUE (269) 11
BOOL_FALSE (270) 12
@@ -130,15 +143,19 @@ string_or_value (47)
option_offset (48)
on left: 14 15, on right: 5
encapsed_list (49)
- on left: 16 17 18, on right: 16 17 21 24
-var_string_list (50)
- on left: 19 20 21 22 23 24, on right: 8 14 22 23 24 25
-expr (51)
- on left: 25 26 27 28 29 30, on right: 10 26 27 28 29 30
-cfg_var_ref (52)
- on left: 31, on right: 16 19 22
-constant_string (53)
- on left: 32 33 34 35 36, on right: 20 23
+ on left: 16 17 18, on right: 16 17 21 24 27 30
+var_string_list_section (50)
+ on left: 19 20 21 22 23 24, on right: 8 22 23 24
+var_string_list (51)
+ on left: 25 26 27 28 29 30, on right: 14 28 29 30 31
+expr (52)
+ on left: 31 32 33 34 35 36, on right: 10 32 33 34 35 36
+cfg_var_ref (53)
+ on left: 37, on right: 16 19 22 25 28
+constant_literal (54)
+ on left: 38 39 40 41 42, on right: 20 23
+constant_string (55)
+ on left: 43 44 45 46 47, on right: 26 29
state 0
@@ -186,9 +203,9 @@ state 3
$default reduce using rule 9 (section_string_or_value)
section_string_or_value go to state 15
- var_string_list go to state 16
+ var_string_list_section go to state 16
cfg_var_ref go to state 17
- constant_string go to state 18
+ constant_literal go to state 18
state 4
@@ -205,20 +222,20 @@ state 5
5 statement: TC_OFFSET . option_offset ']' '=' string_or_value
- TC_RAW shift, and go to state 8
- TC_CONSTANT shift, and go to state 9
- TC_NUMBER shift, and go to state 10
- TC_STRING shift, and go to state 11
- TC_WHITESPACE shift, and go to state 12
+ TC_RAW shift, and go to state 20
+ TC_CONSTANT shift, and go to state 21
+ TC_NUMBER shift, and go to state 22
+ TC_STRING shift, and go to state 23
+ TC_WHITESPACE shift, and go to state 24
TC_DOLLAR_CURLY shift, and go to state 13
- '"' shift, and go to state 14
+ '"' shift, and go to state 25
$default reduce using rule 15 (option_offset)
- option_offset go to state 20
- var_string_list go to state 21
- cfg_var_ref go to state 17
- constant_string go to state 18
+ option_offset go to state 26
+ var_string_list go to state 27
+ cfg_var_ref go to state 28
+ constant_string go to state 29
state 6
@@ -237,68 +254,68 @@ state 7
state 8
- 33 constant_string: TC_RAW .
+ 39 constant_literal: TC_RAW .
- $default reduce using rule 33 (constant_string)
+ $default reduce using rule 39 (constant_literal)
state 9
- 32 constant_string: TC_CONSTANT .
+ 38 constant_literal: TC_CONSTANT .
- $default reduce using rule 32 (constant_string)
+ $default reduce using rule 38 (constant_literal)
state 10
- 34 constant_string: TC_NUMBER .
+ 40 constant_literal: TC_NUMBER .
- $default reduce using rule 34 (constant_string)
+ $default reduce using rule 40 (constant_literal)
state 11
- 35 constant_string: TC_STRING .
+ 41 constant_literal: TC_STRING .
- $default reduce using rule 35 (constant_string)
+ $default reduce using rule 41 (constant_literal)
state 12
- 36 constant_string: TC_WHITESPACE .
+ 42 constant_literal: TC_WHITESPACE .
- $default reduce using rule 36 (constant_string)
+ $default reduce using rule 42 (constant_literal)
state 13
- 31 cfg_var_ref: TC_DOLLAR_CURLY . TC_VARNAME '}'
+ 37 cfg_var_ref: TC_DOLLAR_CURLY . TC_VARNAME '}'
- TC_VARNAME shift, and go to state 22
+ TC_VARNAME shift, and go to state 30
state 14
- 21 var_string_list: '"' . encapsed_list '"'
+ 21 var_string_list_section: '"' . encapsed_list '"'
$default reduce using rule 18 (encapsed_list)
- encapsed_list go to state 23
+ encapsed_list go to state 31
state 15
3 statement: TC_SECTION section_string_or_value . ']'
- ']' shift, and go to state 24
+ ']' shift, and go to state 32
state 16
- 8 section_string_or_value: var_string_list .
- 22 var_string_list: var_string_list . cfg_var_ref
- 23 | var_string_list . constant_string
- 24 | var_string_list . '"' encapsed_list '"'
+ 8 section_string_or_value: var_string_list_section .
+ 22 var_string_list_section: var_string_list_section . cfg_var_ref
+ 23 | var_string_list_section . constant_literal
+ 24 | var_string_list_section . '"' encapsed_list '"'
TC_RAW shift, and go to state 8
TC_CONSTANT shift, and go to state 9
@@ -306,433 +323,554 @@ state 16
TC_STRING shift, and go to state 11
TC_WHITESPACE shift, and go to state 12
TC_DOLLAR_CURLY shift, and go to state 13
- '"' shift, and go to state 25
+ '"' shift, and go to state 33
$default reduce using rule 8 (section_string_or_value)
- cfg_var_ref go to state 26
- constant_string go to state 27
+ cfg_var_ref go to state 34
+ constant_literal go to state 35
state 17
- 19 var_string_list: cfg_var_ref .
+ 19 var_string_list_section: cfg_var_ref .
- $default reduce using rule 19 (var_string_list)
+ $default reduce using rule 19 (var_string_list_section)
state 18
- 20 var_string_list: constant_string .
+ 20 var_string_list_section: constant_literal .
- $default reduce using rule 20 (var_string_list)
+ $default reduce using rule 20 (var_string_list_section)
state 19
4 statement: TC_LABEL '=' . string_or_value
- TC_RAW shift, and go to state 8
- TC_CONSTANT shift, and go to state 9
- TC_NUMBER shift, and go to state 10
- TC_STRING shift, and go to state 11
- TC_WHITESPACE shift, and go to state 12
+ TC_RAW shift, and go to state 20
+ TC_CONSTANT shift, and go to state 21
+ TC_NUMBER shift, and go to state 22
+ TC_STRING shift, and go to state 23
+ TC_WHITESPACE shift, and go to state 24
TC_DOLLAR_CURLY shift, and go to state 13
- BOOL_TRUE shift, and go to state 28
- BOOL_FALSE shift, and go to state 29
- END_OF_LINE shift, and go to state 30
- '"' shift, and go to state 14
- '~' shift, and go to state 31
- '!' shift, and go to state 32
- '(' shift, and go to state 33
+ BOOL_TRUE shift, and go to state 36
+ BOOL_FALSE shift, and go to state 37
+ END_OF_LINE shift, and go to state 38
+ '"' shift, and go to state 25
+ '~' shift, and go to state 39
+ '!' shift, and go to state 40
+ '(' shift, and go to state 41
- string_or_value go to state 34
- var_string_list go to state 35
- expr go to state 36
- cfg_var_ref go to state 17
- constant_string go to state 18
+ string_or_value go to state 42
+ var_string_list go to state 43
+ expr go to state 44
+ cfg_var_ref go to state 28
+ constant_string go to state 29
state 20
- 5 statement: TC_OFFSET option_offset . ']' '=' string_or_value
+ 44 constant_string: TC_RAW .
- ']' shift, and go to state 37
+ $default reduce using rule 44 (constant_string)
state 21
- 14 option_offset: var_string_list .
- 22 var_string_list: var_string_list . cfg_var_ref
- 23 | var_string_list . constant_string
- 24 | var_string_list . '"' encapsed_list '"'
+ 43 constant_string: TC_CONSTANT .
- TC_RAW shift, and go to state 8
- TC_CONSTANT shift, and go to state 9
- TC_NUMBER shift, and go to state 10
- TC_STRING shift, and go to state 11
- TC_WHITESPACE shift, and go to state 12
+ $default reduce using rule 43 (constant_string)
+
+
+state 22
+
+ 45 constant_string: TC_NUMBER .
+
+ $default reduce using rule 45 (constant_string)
+
+
+state 23
+
+ 46 constant_string: TC_STRING .
+
+ $default reduce using rule 46 (constant_string)
+
+
+state 24
+
+ 47 constant_string: TC_WHITESPACE .
+
+ $default reduce using rule 47 (constant_string)
+
+
+state 25
+
+ 27 var_string_list: '"' . encapsed_list '"'
+
+ $default reduce using rule 18 (encapsed_list)
+
+ encapsed_list go to state 45
+
+
+state 26
+
+ 5 statement: TC_OFFSET option_offset . ']' '=' string_or_value
+
+ ']' shift, and go to state 46
+
+
+state 27
+
+ 14 option_offset: var_string_list .
+ 28 var_string_list: var_string_list . cfg_var_ref
+ 29 | var_string_list . constant_string
+ 30 | var_string_list . '"' encapsed_list '"'
+
+ TC_RAW shift, and go to state 20
+ TC_CONSTANT shift, and go to state 21
+ TC_NUMBER shift, and go to state 22
+ TC_STRING shift, and go to state 23
+ TC_WHITESPACE shift, and go to state 24
TC_DOLLAR_CURLY shift, and go to state 13
- '"' shift, and go to state 25
+ '"' shift, and go to state 47
$default reduce using rule 14 (option_offset)
- cfg_var_ref go to state 26
- constant_string go to state 27
+ cfg_var_ref go to state 48
+ constant_string go to state 49
-state 22
+state 28
- 31 cfg_var_ref: TC_DOLLAR_CURLY TC_VARNAME . '}'
+ 25 var_string_list: cfg_var_ref .
- '}' shift, and go to state 38
+ $default reduce using rule 25 (var_string_list)
-state 23
+state 29
+
+ 26 var_string_list: constant_string .
+
+ $default reduce using rule 26 (var_string_list)
+
+
+state 30
+
+ 37 cfg_var_ref: TC_DOLLAR_CURLY TC_VARNAME . '}'
+
+ '}' shift, and go to state 50
+
+
+state 31
16 encapsed_list: encapsed_list . cfg_var_ref
17 | encapsed_list . TC_QUOTED_STRING
- 21 var_string_list: '"' encapsed_list . '"'
+ 21 var_string_list_section: '"' encapsed_list . '"'
TC_DOLLAR_CURLY shift, and go to state 13
- TC_QUOTED_STRING shift, and go to state 39
- '"' shift, and go to state 40
+ TC_QUOTED_STRING shift, and go to state 51
+ '"' shift, and go to state 52
- cfg_var_ref go to state 41
+ cfg_var_ref go to state 53
-state 24
+state 32
3 statement: TC_SECTION section_string_or_value ']' .
$default reduce using rule 3 (statement)
-state 25
+state 33
- 24 var_string_list: var_string_list '"' . encapsed_list '"'
+ 24 var_string_list_section: var_string_list_section '"' . encapsed_list '"'
$default reduce using rule 18 (encapsed_list)
- encapsed_list go to state 42
+ encapsed_list go to state 54
-state 26
+state 34
- 22 var_string_list: var_string_list cfg_var_ref .
+ 22 var_string_list_section: var_string_list_section cfg_var_ref .
- $default reduce using rule 22 (var_string_list)
+ $default reduce using rule 22 (var_string_list_section)
-state 27
+state 35
- 23 var_string_list: var_string_list constant_string .
+ 23 var_string_list_section: var_string_list_section constant_literal .
- $default reduce using rule 23 (var_string_list)
+ $default reduce using rule 23 (var_string_list_section)
-state 28
+state 36
11 string_or_value: BOOL_TRUE .
$default reduce using rule 11 (string_or_value)
-state 29
+state 37
12 string_or_value: BOOL_FALSE .
$default reduce using rule 12 (string_or_value)
-state 30
+state 38
13 string_or_value: END_OF_LINE .
$default reduce using rule 13 (string_or_value)
-state 31
+state 39
- 28 expr: '~' . expr
+ 34 expr: '~' . expr
- TC_RAW shift, and go to state 8
- TC_CONSTANT shift, and go to state 9
- TC_NUMBER shift, and go to state 10
- TC_STRING shift, and go to state 11
- TC_WHITESPACE shift, and go to state 12
+ TC_RAW shift, and go to state 20
+ TC_CONSTANT shift, and go to state 21
+ TC_NUMBER shift, and go to state 22
+ TC_STRING shift, and go to state 23
+ TC_WHITESPACE shift, and go to state 24
TC_DOLLAR_CURLY shift, and go to state 13
- '"' shift, and go to state 14
- '~' shift, and go to state 31
- '!' shift, and go to state 32
- '(' shift, and go to state 33
+ '"' shift, and go to state 25
+ '~' shift, and go to state 39
+ '!' shift, and go to state 40
+ '(' shift, and go to state 41
- var_string_list go to state 35
- expr go to state 43
- cfg_var_ref go to state 17
- constant_string go to state 18
+ var_string_list go to state 43
+ expr go to state 55
+ cfg_var_ref go to state 28
+ constant_string go to state 29
-state 32
+state 40
- 29 expr: '!' . expr
+ 35 expr: '!' . expr
- TC_RAW shift, and go to state 8
- TC_CONSTANT shift, and go to state 9
- TC_NUMBER shift, and go to state 10
- TC_STRING shift, and go to state 11
- TC_WHITESPACE shift, and go to state 12
+ TC_RAW shift, and go to state 20
+ TC_CONSTANT shift, and go to state 21
+ TC_NUMBER shift, and go to state 22
+ TC_STRING shift, and go to state 23
+ TC_WHITESPACE shift, and go to state 24
TC_DOLLAR_CURLY shift, and go to state 13
- '"' shift, and go to state 14
- '~' shift, and go to state 31
- '!' shift, and go to state 32
- '(' shift, and go to state 33
+ '"' shift, and go to state 25
+ '~' shift, and go to state 39
+ '!' shift, and go to state 40
+ '(' shift, and go to state 41
- var_string_list go to state 35
- expr go to state 44
- cfg_var_ref go to state 17
- constant_string go to state 18
+ var_string_list go to state 43
+ expr go to state 56
+ cfg_var_ref go to state 28
+ constant_string go to state 29
-state 33
+state 41
- 30 expr: '(' . expr ')'
+ 36 expr: '(' . expr ')'
- TC_RAW shift, and go to state 8
- TC_CONSTANT shift, and go to state 9
- TC_NUMBER shift, and go to state 10
- TC_STRING shift, and go to state 11
- TC_WHITESPACE shift, and go to state 12
+ TC_RAW shift, and go to state 20
+ TC_CONSTANT shift, and go to state 21
+ TC_NUMBER shift, and go to state 22
+ TC_STRING shift, and go to state 23
+ TC_WHITESPACE shift, and go to state 24
TC_DOLLAR_CURLY shift, and go to state 13
- '"' shift, and go to state 14
- '~' shift, and go to state 31
- '!' shift, and go to state 32
- '(' shift, and go to state 33
+ '"' shift, and go to state 25
+ '~' shift, and go to state 39
+ '!' shift, and go to state 40
+ '(' shift, and go to state 41
- var_string_list go to state 35
- expr go to state 45
- cfg_var_ref go to state 17
- constant_string go to state 18
+ var_string_list go to state 43
+ expr go to state 57
+ cfg_var_ref go to state 28
+ constant_string go to state 29
-state 34
+state 42
4 statement: TC_LABEL '=' string_or_value .
$default reduce using rule 4 (statement)
-state 35
+state 43
- 22 var_string_list: var_string_list . cfg_var_ref
- 23 | var_string_list . constant_string
- 24 | var_string_list . '"' encapsed_list '"'
- 25 expr: var_string_list .
+ 28 var_string_list: var_string_list . cfg_var_ref
+ 29 | var_string_list . constant_string
+ 30 | var_string_list . '"' encapsed_list '"'
+ 31 expr: var_string_list .
- TC_RAW shift, and go to state 8
- TC_CONSTANT shift, and go to state 9
- TC_NUMBER shift, and go to state 10
- TC_STRING shift, and go to state 11
- TC_WHITESPACE shift, and go to state 12
+ TC_RAW shift, and go to state 20
+ TC_CONSTANT shift, and go to state 21
+ TC_NUMBER shift, and go to state 22
+ TC_STRING shift, and go to state 23
+ TC_WHITESPACE shift, and go to state 24
TC_DOLLAR_CURLY shift, and go to state 13
- '"' shift, and go to state 25
+ '"' shift, and go to state 47
- $default reduce using rule 25 (expr)
+ $default reduce using rule 31 (expr)
- cfg_var_ref go to state 26
- constant_string go to state 27
+ cfg_var_ref go to state 48
+ constant_string go to state 49
-state 36
+state 44
10 string_or_value: expr .
- 26 expr: expr . '|' expr
- 27 | expr . '&' expr
+ 32 expr: expr . '|' expr
+ 33 | expr . '&' expr
- '|' shift, and go to state 46
- '&' shift, and go to state 47
+ '|' shift, and go to state 58
+ '&' shift, and go to state 59
$default reduce using rule 10 (string_or_value)
-state 37
+state 45
+
+ 16 encapsed_list: encapsed_list . cfg_var_ref
+ 17 | encapsed_list . TC_QUOTED_STRING
+ 27 var_string_list: '"' encapsed_list . '"'
+
+ TC_DOLLAR_CURLY shift, and go to state 13
+ TC_QUOTED_STRING shift, and go to state 51
+ '"' shift, and go to state 60
+
+ cfg_var_ref go to state 53
+
+
+state 46
5 statement: TC_OFFSET option_offset ']' . '=' string_or_value
- '=' shift, and go to state 48
+ '=' shift, and go to state 61
-state 38
+state 47
- 31 cfg_var_ref: TC_DOLLAR_CURLY TC_VARNAME '}' .
+ 30 var_string_list: var_string_list '"' . encapsed_list '"'
- $default reduce using rule 31 (cfg_var_ref)
+ $default reduce using rule 18 (encapsed_list)
+ encapsed_list go to state 62
+
+
+state 48
+
+ 28 var_string_list: var_string_list cfg_var_ref .
+
+ $default reduce using rule 28 (var_string_list)
-state 39
+
+state 49
+
+ 29 var_string_list: var_string_list constant_string .
+
+ $default reduce using rule 29 (var_string_list)
+
+
+state 50
+
+ 37 cfg_var_ref: TC_DOLLAR_CURLY TC_VARNAME '}' .
+
+ $default reduce using rule 37 (cfg_var_ref)
+
+
+state 51
17 encapsed_list: encapsed_list TC_QUOTED_STRING .
$default reduce using rule 17 (encapsed_list)
-state 40
+state 52
- 21 var_string_list: '"' encapsed_list '"' .
+ 21 var_string_list_section: '"' encapsed_list '"' .
- $default reduce using rule 21 (var_string_list)
+ $default reduce using rule 21 (var_string_list_section)
-state 41
+state 53
16 encapsed_list: encapsed_list cfg_var_ref .
$default reduce using rule 16 (encapsed_list)
-state 42
+state 54
16 encapsed_list: encapsed_list . cfg_var_ref
17 | encapsed_list . TC_QUOTED_STRING
- 24 var_string_list: var_string_list '"' encapsed_list . '"'
+ 24 var_string_list_section: var_string_list_section '"' encapsed_list . '"'
TC_DOLLAR_CURLY shift, and go to state 13
- TC_QUOTED_STRING shift, and go to state 39
- '"' shift, and go to state 49
+ TC_QUOTED_STRING shift, and go to state 51
+ '"' shift, and go to state 63
- cfg_var_ref go to state 41
+ cfg_var_ref go to state 53
-state 43
+state 55
- 26 expr: expr . '|' expr
- 27 | expr . '&' expr
- 28 | '~' expr .
+ 32 expr: expr . '|' expr
+ 33 | expr . '&' expr
+ 34 | '~' expr .
- $default reduce using rule 28 (expr)
+ $default reduce using rule 34 (expr)
-state 44
+state 56
- 26 expr: expr . '|' expr
- 27 | expr . '&' expr
- 29 | '!' expr .
+ 32 expr: expr . '|' expr
+ 33 | expr . '&' expr
+ 35 | '!' expr .
- $default reduce using rule 29 (expr)
+ $default reduce using rule 35 (expr)
-state 45
+state 57
- 26 expr: expr . '|' expr
- 27 | expr . '&' expr
- 30 | '(' expr . ')'
+ 32 expr: expr . '|' expr
+ 33 | expr . '&' expr
+ 36 | '(' expr . ')'
- '|' shift, and go to state 46
- '&' shift, and go to state 47
- ')' shift, and go to state 50
+ '|' shift, and go to state 58
+ '&' shift, and go to state 59
+ ')' shift, and go to state 64
-state 46
+state 58
- 26 expr: expr '|' . expr
+ 32 expr: expr '|' . expr
- TC_RAW shift, and go to state 8
- TC_CONSTANT shift, and go to state 9
- TC_NUMBER shift, and go to state 10
- TC_STRING shift, and go to state 11
- TC_WHITESPACE shift, and go to state 12
+ TC_RAW shift, and go to state 20
+ TC_CONSTANT shift, and go to state 21
+ TC_NUMBER shift, and go to state 22
+ TC_STRING shift, and go to state 23
+ TC_WHITESPACE shift, and go to state 24
TC_DOLLAR_CURLY shift, and go to state 13
- '"' shift, and go to state 14
- '~' shift, and go to state 31
- '!' shift, and go to state 32
- '(' shift, and go to state 33
+ '"' shift, and go to state 25
+ '~' shift, and go to state 39
+ '!' shift, and go to state 40
+ '(' shift, and go to state 41
- var_string_list go to state 35
- expr go to state 51
- cfg_var_ref go to state 17
- constant_string go to state 18
+ var_string_list go to state 43
+ expr go to state 65
+ cfg_var_ref go to state 28
+ constant_string go to state 29
-state 47
+state 59
- 27 expr: expr '&' . expr
+ 33 expr: expr '&' . expr
- TC_RAW shift, and go to state 8
- TC_CONSTANT shift, and go to state 9
- TC_NUMBER shift, and go to state 10
- TC_STRING shift, and go to state 11
- TC_WHITESPACE shift, and go to state 12
+ TC_RAW shift, and go to state 20
+ TC_CONSTANT shift, and go to state 21
+ TC_NUMBER shift, and go to state 22
+ TC_STRING shift, and go to state 23
+ TC_WHITESPACE shift, and go to state 24
TC_DOLLAR_CURLY shift, and go to state 13
- '"' shift, and go to state 14
- '~' shift, and go to state 31
- '!' shift, and go to state 32
- '(' shift, and go to state 33
+ '"' shift, and go to state 25
+ '~' shift, and go to state 39
+ '!' shift, and go to state 40
+ '(' shift, and go to state 41
- var_string_list go to state 35
- expr go to state 52
- cfg_var_ref go to state 17
- constant_string go to state 18
+ var_string_list go to state 43
+ expr go to state 66
+ cfg_var_ref go to state 28
+ constant_string go to state 29
-state 48
+state 60
+
+ 27 var_string_list: '"' encapsed_list '"' .
+
+ $default reduce using rule 27 (var_string_list)
+
+
+state 61
5 statement: TC_OFFSET option_offset ']' '=' . string_or_value
- TC_RAW shift, and go to state 8
- TC_CONSTANT shift, and go to state 9
- TC_NUMBER shift, and go to state 10
- TC_STRING shift, and go to state 11
- TC_WHITESPACE shift, and go to state 12
+ TC_RAW shift, and go to state 20
+ TC_CONSTANT shift, and go to state 21
+ TC_NUMBER shift, and go to state 22
+ TC_STRING shift, and go to state 23
+ TC_WHITESPACE shift, and go to state 24
TC_DOLLAR_CURLY shift, and go to state 13
- BOOL_TRUE shift, and go to state 28
- BOOL_FALSE shift, and go to state 29
- END_OF_LINE shift, and go to state 30
- '"' shift, and go to state 14
- '~' shift, and go to state 31
- '!' shift, and go to state 32
- '(' shift, and go to state 33
+ BOOL_TRUE shift, and go to state 36
+ BOOL_FALSE shift, and go to state 37
+ END_OF_LINE shift, and go to state 38
+ '"' shift, and go to state 25
+ '~' shift, and go to state 39
+ '!' shift, and go to state 40
+ '(' shift, and go to state 41
- string_or_value go to state 53
- var_string_list go to state 35
- expr go to state 36
- cfg_var_ref go to state 17
- constant_string go to state 18
+ string_or_value go to state 67
+ var_string_list go to state 43
+ expr go to state 44
+ cfg_var_ref go to state 28
+ constant_string go to state 29
-state 49
+state 62
+
+ 16 encapsed_list: encapsed_list . cfg_var_ref
+ 17 | encapsed_list . TC_QUOTED_STRING
+ 30 var_string_list: var_string_list '"' encapsed_list . '"'
- 24 var_string_list: var_string_list '"' encapsed_list '"' .
+ TC_DOLLAR_CURLY shift, and go to state 13
+ TC_QUOTED_STRING shift, and go to state 51
+ '"' shift, and go to state 68
- $default reduce using rule 24 (var_string_list)
+ cfg_var_ref go to state 53
-state 50
+state 63
- 30 expr: '(' expr ')' .
+ 24 var_string_list_section: var_string_list_section '"' encapsed_list '"' .
- $default reduce using rule 30 (expr)
+ $default reduce using rule 24 (var_string_list_section)
-state 51
+state 64
- 26 expr: expr . '|' expr
- 26 | expr '|' expr .
- 27 | expr . '&' expr
+ 36 expr: '(' expr ')' .
- $default reduce using rule 26 (expr)
+ $default reduce using rule 36 (expr)
-state 52
+state 65
- 26 expr: expr . '|' expr
- 27 | expr . '&' expr
- 27 | expr '&' expr .
+ 32 expr: expr . '|' expr
+ 32 | expr '|' expr .
+ 33 | expr . '&' expr
- $default reduce using rule 27 (expr)
+ $default reduce using rule 32 (expr)
-state 53
+state 66
+
+ 32 expr: expr . '|' expr
+ 33 | expr . '&' expr
+ 33 | expr '&' expr .
+
+ $default reduce using rule 33 (expr)
+
+
+state 67
5 statement: TC_OFFSET option_offset ']' '=' string_or_value .
$default reduce using rule 5 (statement)
+
+
+state 68
+
+ 30 var_string_list: var_string_list '"' encapsed_list '"' .
+
+ $default reduce using rule 30 (var_string_list)
diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y
index e4755fb0f..672947f08 100644
--- a/Zend/zend_ini_parser.y
+++ b/Zend/zend_ini_parser.y
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini_parser.y 293154 2010-01-05 20:40:23Z sebastian $ */
+/* $Id: zend_ini_parser.y 300737 2010-06-24 22:32:42Z felipe $ */
#define DEBUG_CFG_PARSER 0
@@ -304,7 +304,7 @@ statement:
;
section_string_or_value:
- var_string_list { $$ = $1; }
+ var_string_list_section { $$ = $1; }
| /* empty */ { zend_ini_init_string(&$$); }
;
@@ -326,6 +326,15 @@ encapsed_list:
| /* empty */ { zend_ini_init_string(&$$); }
;
+var_string_list_section:
+ cfg_var_ref { $$ = $1; }
+ | constant_literal { $$ = $1; }
+ | '"' encapsed_list '"' { $$ = $2; }
+ | var_string_list_section cfg_var_ref { zend_ini_add_string(&$$, &$1, &$2); free(Z_STRVAL($2)); }
+ | var_string_list_section constant_literal { zend_ini_add_string(&$$, &$1, &$2); free(Z_STRVAL($2)); }
+ | var_string_list_section '"' encapsed_list '"' { zend_ini_add_string(&$$, &$1, &$3); free(Z_STRVAL($3)); }
+;
+
var_string_list:
cfg_var_ref { $$ = $1; }
| constant_string { $$ = $1; }
@@ -348,6 +357,14 @@ cfg_var_ref:
TC_DOLLAR_CURLY TC_VARNAME '}' { zend_ini_get_var(&$$, &$2 TSRMLS_CC); free(Z_STRVAL($2)); }
;
+constant_literal:
+ TC_CONSTANT { $$ = $1; }
+ | TC_RAW { $$ = $1; /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ }
+ | TC_NUMBER { $$ = $1; /*printf("TC_NUMBER: '%s'\n", Z_STRVAL($1));*/ }
+ | TC_STRING { $$ = $1; /*printf("TC_STRING: '%s'\n", Z_STRVAL($1));*/ }
+ | TC_WHITESPACE { $$ = $1; /*printf("TC_WHITESPACE: '%s'\n", Z_STRVAL($1));*/ }
+;
+
constant_string:
TC_CONSTANT { zend_ini_get_constant(&$$, &$1 TSRMLS_CC); }
| TC_RAW { $$ = $1; /*printf("TC_RAW: '%s'\n", Z_STRVAL($1));*/ }
diff --git a/Zend/zend_ini_scanner.c b/Zend/zend_ini_scanner.c
index d05d78ab6..25a9c52e5 100644
--- a/Zend/zend_ini_scanner.c
+++ b/Zend/zend_ini_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Sun Feb 7 13:25:37 2010 */
+/* Generated by re2c 0.13.5 on Tue May 25 22:53:58 2010 */
#line 1 "Zend/zend_ini_scanner.l"
/*
+----------------------------------------------------------------------+
@@ -22,7 +22,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini_scanner.c 294698 2010-02-07 12:08:22Z pajoye $ */
+/* $Id: zend_ini_scanner.c 299767 2010-05-26 02:18:17Z felipe $ */
#include <errno.h>
#include "zend.h"
@@ -317,7 +317,7 @@ restart:
if (YYCURSOR >= YYLIMIT) {
if (YYSTATE == STATE(ST_VALUE) || YYSTATE == STATE(ST_RAW)) {
BEGIN(INITIAL);
- return 0;
+ return END_OF_LINE;
}
return 0;
}
diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l
index 998665bc2..e88b45e47 100644
--- a/Zend/zend_ini_scanner.l
+++ b/Zend/zend_ini_scanner.l
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini_scanner.l 294698 2010-02-07 12:08:22Z pajoye $ */
+/* $Id: zend_ini_scanner.l 299767 2010-05-26 02:18:17Z felipe $ */
#include <errno.h>
#include "zend.h"
@@ -315,7 +315,7 @@ restart:
if (YYCURSOR >= YYLIMIT) {
if (YYSTATE == STATE(ST_VALUE) || YYSTATE == STATE(ST_RAW)) {
BEGIN(INITIAL);
- return 0;
+ return END_OF_LINE;
}
return 0;
}
diff --git a/Zend/zend_ini_scanner_defs.h b/Zend/zend_ini_scanner_defs.h
index 1956b6225..4107238ad 100644
--- a/Zend/zend_ini_scanner_defs.h
+++ b/Zend/zend_ini_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Sun Feb 7 13:25:37 2010 */
+/* Generated by re2c 0.13.5 on Tue May 25 22:53:58 2010 */
#line 3 "Zend/zend_ini_scanner_defs.h"
enum YYCONDTYPE {
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index 7dc47b138..f9309e475 100755
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_interfaces.c 294549 2010-02-05 00:37:07Z pajoye $ */
+/* $Id: zend_interfaces.c 294333 2010-02-02 04:49:02Z colder $ */
#include "zend.h"
#include "zend_API.h"
diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c
index 3f5fefa7c..c71f2ba77 100644
--- a/Zend/zend_language_scanner.c
+++ b/Zend/zend_language_scanner.c
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Mon Nov 16 23:30:01 2009 */
+/* Generated by re2c 0.13.5 on Tue Jun 29 23:22:29 2010 */
#line 1 "Zend/zend_language_scanner.l"
/*
+----------------------------------------------------------------------+
@@ -23,7 +23,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_scanner.c 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_language_scanner.c 300871 2010-06-30 02:45:10Z felipe $ */
#if 0
# define YYDEBUG(s, c) printf("state: %d char: %c\n", s, c)
@@ -141,8 +141,10 @@ static void yy_pop_state(TSRMLS_D)
static void yy_scan_buffer(char *str, unsigned int len TSRMLS_DC)
{
YYCURSOR = (YYCTYPE*)str;
- SCNG(yy_start) = YYCURSOR;
YYLIMIT = YYCURSOR + len;
+ if (!SCNG(yy_start)) {
+ SCNG(yy_start) = YYCURSOR;
+ }
}
void startup_scanner(TSRMLS_D)
@@ -243,7 +245,14 @@ ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC)
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
{
char *file_path = NULL, *buf;
- size_t size;
+ size_t size, offset = 0;
+
+ /* The shebang line was read, get the current position to obtain the buffer start */
+ if (CG(start_lineno) == 2 && file_handle->type == ZEND_HANDLE_FP && file_handle->handle.fp) {
+ if ((offset = ftell(file_handle->handle.fp)) == -1) {
+ offset = 0;
+ }
+ }
if (zend_stream_fixup(file_handle, &buf, &size TSRMLS_CC) == FAILURE) {
return FAILURE;
@@ -259,6 +268,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
/* Reset the scanner for scanning the new file */
SCNG(yy_in) = file_handle;
+ SCNG(yy_start) = NULL;
if (size != -1) {
#ifdef ZEND_MULTIBYTE
@@ -277,9 +287,10 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
} else {
SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC);
}
-
+ SCNG(yy_start) = SCNG(script_filtered) - offset;
yy_scan_buffer((char *)SCNG(script_filtered), SCNG(script_filtered_size) TSRMLS_CC);
#else /* !ZEND_MULTIBYTE */
+ SCNG(yy_start) = buf - offset;
yy_scan_buffer(buf, size TSRMLS_CC);
#endif /* ZEND_MULTIBYTE */
} else {
@@ -415,6 +426,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
memset(str->value.str.val + str->value.str.len, 0, ZEND_MMAP_AHEAD);
SCNG(yy_in)=NULL;
+ SCNG(yy_start) = NULL;
#ifdef ZEND_MULTIBYTE
SCNG(script_org) = (unsigned char *)estrdup(str->value.str.val);
@@ -834,7 +846,7 @@ restart:
yymore_restart:
-#line 838 "Zend/zend_language_scanner.c"
+#line 850 "Zend/zend_language_scanner.c"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@@ -933,7 +945,7 @@ yyc_INITIAL:
yy3:
YYDEBUG(3, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1562 "Zend/zend_language_scanner.l"
+#line 1574 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -998,7 +1010,7 @@ inline_html:
HANDLE_NEWLINES(yytext, yyleng);
return T_INLINE_HTML;
}
-#line 1002 "Zend/zend_language_scanner.c"
+#line 1014 "Zend/zend_language_scanner.c"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1016,7 +1028,7 @@ yy5:
yy6:
YYDEBUG(6, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1550 "Zend/zend_language_scanner.l"
+#line 1562 "Zend/zend_language_scanner.l"
{
if (CG(short_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1028,14 +1040,14 @@ yy6:
goto inline_char_handler;
}
}
-#line 1032 "Zend/zend_language_scanner.c"
+#line 1044 "Zend/zend_language_scanner.c"
yy7:
YYDEBUG(7, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '=') goto yy43;
YYDEBUG(8, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1527 "Zend/zend_language_scanner.l"
+#line 1539 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1047,7 +1059,7 @@ yy7:
goto inline_char_handler;
}
}
-#line 1051 "Zend/zend_language_scanner.c"
+#line 1063 "Zend/zend_language_scanner.c"
yy9:
YYDEBUG(9, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1233,7 +1245,7 @@ yy35:
++YYCURSOR;
YYDEBUG(38, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1483 "Zend/zend_language_scanner.l"
+#line 1495 "Zend/zend_language_scanner.l"
{
YYCTYPE *bracket = zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1));
@@ -1250,7 +1262,7 @@ yy35:
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
}
-#line 1254 "Zend/zend_language_scanner.c"
+#line 1266 "Zend/zend_language_scanner.c"
yy39:
YYDEBUG(39, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1277,7 +1289,7 @@ yy43:
++YYCURSOR;
YYDEBUG(44, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1501 "Zend/zend_language_scanner.l"
+#line 1513 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1289,13 +1301,13 @@ yy43:
goto inline_char_handler;
}
}
-#line 1293 "Zend/zend_language_scanner.c"
+#line 1305 "Zend/zend_language_scanner.c"
yy45:
YYDEBUG(45, *YYCURSOR);
++YYCURSOR;
YYDEBUG(46, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1514 "Zend/zend_language_scanner.l"
+#line 1526 "Zend/zend_language_scanner.l"
{
if (CG(short_tags)) {
zendlval->value.str.val = yytext; /* no copying - intentional */
@@ -1307,7 +1319,7 @@ yy45:
goto inline_char_handler;
}
}
-#line 1311 "Zend/zend_language_scanner.c"
+#line 1323 "Zend/zend_language_scanner.c"
yy47:
YYDEBUG(47, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1334,7 +1346,7 @@ yy50:
yy51:
YYDEBUG(51, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1540 "Zend/zend_language_scanner.l"
+#line 1552 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -1343,7 +1355,7 @@ yy51:
BEGIN(ST_IN_SCRIPTING);
return T_OPEN_TAG;
}
-#line 1347 "Zend/zend_language_scanner.c"
+#line 1359 "Zend/zend_language_scanner.c"
yy52:
YYDEBUG(52, *YYCURSOR);
++YYCURSOR;
@@ -1414,7 +1426,7 @@ yyc_ST_BACKQUOTE:
yy56:
YYDEBUG(56, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2020 "Zend/zend_language_scanner.l"
+#line 2032 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -1455,7 +1467,7 @@ yy56:
zend_scan_escape_string(zendlval, yytext, yyleng, '`' TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1459 "Zend/zend_language_scanner.c"
+#line 1471 "Zend/zend_language_scanner.c"
yy57:
YYDEBUG(57, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1466,12 +1478,12 @@ yy58:
++YYCURSOR;
YYDEBUG(59, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1964 "Zend/zend_language_scanner.l"
+#line 1976 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
return '`';
}
-#line 1475 "Zend/zend_language_scanner.c"
+#line 1487 "Zend/zend_language_scanner.c"
yy60:
YYDEBUG(60, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1481,14 +1493,14 @@ yy61:
++YYCURSOR;
YYDEBUG(62, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1951 "Zend/zend_language_scanner.l"
+#line 1963 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 1492 "Zend/zend_language_scanner.c"
+#line 1504 "Zend/zend_language_scanner.c"
yy63:
YYDEBUG(63, *YYCURSOR);
yyaccept = 0;
@@ -1504,24 +1516,24 @@ yy63:
yy65:
YYDEBUG(65, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1649 "Zend/zend_language_scanner.l"
+#line 1661 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1514 "Zend/zend_language_scanner.c"
+#line 1526 "Zend/zend_language_scanner.c"
yy66:
YYDEBUG(66, *YYCURSOR);
++YYCURSOR;
YYDEBUG(67, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1276 "Zend/zend_language_scanner.l"
+#line 1288 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 1525 "Zend/zend_language_scanner.c"
+#line 1537 "Zend/zend_language_scanner.c"
yy68:
YYDEBUG(68, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1535,7 +1547,7 @@ yy70:
++YYCURSOR;
YYDEBUG(71, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1641 "Zend/zend_language_scanner.l"
+#line 1653 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -1543,7 +1555,7 @@ yy70:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1547 "Zend/zend_language_scanner.c"
+#line 1559 "Zend/zend_language_scanner.c"
yy72:
YYDEBUG(72, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1561,7 +1573,7 @@ yy73:
++YYCURSOR;
YYDEBUG(74, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1631 "Zend/zend_language_scanner.l"
+#line 1643 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -1569,7 +1581,7 @@ yy73:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1573 "Zend/zend_language_scanner.c"
+#line 1585 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_DOUBLE_QUOTES:
@@ -1637,7 +1649,7 @@ yy77:
yy78:
YYDEBUG(78, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1970 "Zend/zend_language_scanner.l"
+#line 1982 "Zend/zend_language_scanner.l"
{
if (GET_DOUBLE_QUOTES_SCANNED_LENGTH()) {
YYCURSOR += GET_DOUBLE_QUOTES_SCANNED_LENGTH() - 1;
@@ -1686,7 +1698,7 @@ double_quotes_scan_done:
zend_scan_escape_string(zendlval, yytext, yyleng, '"' TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1690 "Zend/zend_language_scanner.c"
+#line 1702 "Zend/zend_language_scanner.c"
yy79:
YYDEBUG(79, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1697,12 +1709,12 @@ yy80:
++YYCURSOR;
YYDEBUG(81, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1959 "Zend/zend_language_scanner.l"
+#line 1971 "Zend/zend_language_scanner.l"
{
BEGIN(ST_IN_SCRIPTING);
return '"';
}
-#line 1706 "Zend/zend_language_scanner.c"
+#line 1718 "Zend/zend_language_scanner.c"
yy82:
YYDEBUG(82, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1712,14 +1724,14 @@ yy83:
++YYCURSOR;
YYDEBUG(84, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1951 "Zend/zend_language_scanner.l"
+#line 1963 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 1723 "Zend/zend_language_scanner.c"
+#line 1735 "Zend/zend_language_scanner.c"
yy85:
YYDEBUG(85, *YYCURSOR);
yyaccept = 0;
@@ -1735,24 +1747,24 @@ yy85:
yy87:
YYDEBUG(87, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1649 "Zend/zend_language_scanner.l"
+#line 1661 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1745 "Zend/zend_language_scanner.c"
+#line 1757 "Zend/zend_language_scanner.c"
yy88:
YYDEBUG(88, *YYCURSOR);
++YYCURSOR;
YYDEBUG(89, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1276 "Zend/zend_language_scanner.l"
+#line 1288 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 1756 "Zend/zend_language_scanner.c"
+#line 1768 "Zend/zend_language_scanner.c"
yy90:
YYDEBUG(90, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1766,7 +1778,7 @@ yy92:
++YYCURSOR;
YYDEBUG(93, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1641 "Zend/zend_language_scanner.l"
+#line 1653 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -1774,7 +1786,7 @@ yy92:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1778 "Zend/zend_language_scanner.c"
+#line 1790 "Zend/zend_language_scanner.c"
yy94:
YYDEBUG(94, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1792,7 +1804,7 @@ yy95:
++YYCURSOR;
YYDEBUG(96, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1631 "Zend/zend_language_scanner.l"
+#line 1643 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -1800,7 +1812,7 @@ yy95:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 1804 "Zend/zend_language_scanner.c"
+#line 1816 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_END_HEREDOC:
@@ -1811,7 +1823,7 @@ yyc_ST_END_HEREDOC:
++YYCURSOR;
YYDEBUG(100, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1938 "Zend/zend_language_scanner.l"
+#line 1950 "Zend/zend_language_scanner.l"
{
YYCURSOR += CG(heredoc_len) - 1;
yyleng = CG(heredoc_len);
@@ -1823,7 +1835,7 @@ yyc_ST_END_HEREDOC:
BEGIN(ST_IN_SCRIPTING);
return T_END_HEREDOC;
}
-#line 1827 "Zend/zend_language_scanner.c"
+#line 1839 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_HEREDOC:
{
@@ -1885,7 +1897,7 @@ yy103:
yy104:
YYDEBUG(104, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2062 "Zend/zend_language_scanner.l"
+#line 2074 "Zend/zend_language_scanner.l"
{
int newline = 0;
@@ -1956,7 +1968,7 @@ heredoc_scan_done:
zend_scan_escape_string(zendlval, yytext, yyleng - newline, 0 TSRMLS_CC);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 1960 "Zend/zend_language_scanner.c"
+#line 1972 "Zend/zend_language_scanner.c"
yy105:
YYDEBUG(105, *YYCURSOR);
yych = *++YYCURSOR;
@@ -1971,14 +1983,14 @@ yy107:
++YYCURSOR;
YYDEBUG(108, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1951 "Zend/zend_language_scanner.l"
+#line 1963 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = (long) '{';
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
yyless(1);
return T_CURLY_OPEN;
}
-#line 1982 "Zend/zend_language_scanner.c"
+#line 1994 "Zend/zend_language_scanner.c"
yy109:
YYDEBUG(109, *YYCURSOR);
yyaccept = 0;
@@ -1994,24 +2006,24 @@ yy109:
yy111:
YYDEBUG(111, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1649 "Zend/zend_language_scanner.l"
+#line 1661 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2004 "Zend/zend_language_scanner.c"
+#line 2016 "Zend/zend_language_scanner.c"
yy112:
YYDEBUG(112, *YYCURSOR);
++YYCURSOR;
YYDEBUG(113, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1276 "Zend/zend_language_scanner.l"
+#line 1288 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_VARNAME TSRMLS_CC);
return T_DOLLAR_OPEN_CURLY_BRACES;
}
-#line 2015 "Zend/zend_language_scanner.c"
+#line 2027 "Zend/zend_language_scanner.c"
yy114:
YYDEBUG(114, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2025,7 +2037,7 @@ yy116:
++YYCURSOR;
YYDEBUG(117, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1641 "Zend/zend_language_scanner.l"
+#line 1653 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 1);
yy_push_state(ST_VAR_OFFSET TSRMLS_CC);
@@ -2033,7 +2045,7 @@ yy116:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2037 "Zend/zend_language_scanner.c"
+#line 2049 "Zend/zend_language_scanner.c"
yy118:
YYDEBUG(118, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2051,7 +2063,7 @@ yy119:
++YYCURSOR;
YYDEBUG(120, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1631 "Zend/zend_language_scanner.l"
+#line 1643 "Zend/zend_language_scanner.l"
{
yyless(yyleng - 3);
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
@@ -2059,7 +2071,7 @@ yy119:
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 2063 "Zend/zend_language_scanner.c"
+#line 2075 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_IN_SCRIPTING:
@@ -2240,13 +2252,13 @@ yy123:
yy124:
YYDEBUG(124, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1672 "Zend/zend_language_scanner.l"
+#line 1684 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 2250 "Zend/zend_language_scanner.c"
+#line 2262 "Zend/zend_language_scanner.c"
yy125:
YYDEBUG(125, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2472,11 +2484,11 @@ yy137:
yy138:
YYDEBUG(138, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1265 "Zend/zend_language_scanner.l"
+#line 1277 "Zend/zend_language_scanner.l"
{
return yytext[0];
}
-#line 2480 "Zend/zend_language_scanner.c"
+#line 2492 "Zend/zend_language_scanner.c"
yy139:
YYDEBUG(139, *YYCURSOR);
++YYCURSOR;
@@ -2485,7 +2497,7 @@ yy139:
yy140:
YYDEBUG(140, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1000 "Zend/zend_language_scanner.l"
+#line 1012 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -2493,7 +2505,7 @@ yy140:
HANDLE_NEWLINES(yytext, yyleng);
return T_WHITESPACE;
}
-#line 2497 "Zend/zend_language_scanner.c"
+#line 2509 "Zend/zend_language_scanner.c"
yy141:
YYDEBUG(141, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2504,11 +2516,11 @@ yy142:
++YYCURSOR;
YYDEBUG(143, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1029 "Zend/zend_language_scanner.l"
+#line 1041 "Zend/zend_language_scanner.l"
{
return T_NS_SEPARATOR;
}
-#line 2512 "Zend/zend_language_scanner.c"
+#line 2524 "Zend/zend_language_scanner.c"
yy144:
YYDEBUG(144, *YYCURSOR);
yych = *++YYCURSOR;
@@ -2736,18 +2748,18 @@ yy167:
++YYCURSOR;
YYDEBUG(168, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1270 "Zend/zend_language_scanner.l"
+#line 1282 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
return '{';
}
-#line 2745 "Zend/zend_language_scanner.c"
+#line 2757 "Zend/zend_language_scanner.c"
yy169:
YYDEBUG(169, *YYCURSOR);
++YYCURSOR;
YYDEBUG(170, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1282 "Zend/zend_language_scanner.l"
+#line 1294 "Zend/zend_language_scanner.l"
{
RESET_DOC_COMMENT();
if (!zend_stack_is_empty(&SCNG(state_stack))) {
@@ -2755,7 +2767,7 @@ yy169:
}
return '}';
}
-#line 2759 "Zend/zend_language_scanner.c"
+#line 2771 "Zend/zend_language_scanner.c"
yy171:
YYDEBUG(171, *YYCURSOR);
yyaccept = 2;
@@ -2778,7 +2790,7 @@ yy171:
yy172:
YYDEBUG(172, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1308 "Zend/zend_language_scanner.l"
+#line 1320 "Zend/zend_language_scanner.l"
{
if (yyleng < MAX_LENGTH_OF_LONG - 1) { /* Won't overflow */
zendlval->value.lval = strtol(yytext, NULL, 0);
@@ -2799,7 +2811,7 @@ yy172:
zendlval->type = IS_LONG;
return T_LNUMBER;
}
-#line 2803 "Zend/zend_language_scanner.c"
+#line 2815 "Zend/zend_language_scanner.c"
yy173:
YYDEBUG(173, *YYCURSOR);
yyaccept = 2;
@@ -2827,7 +2839,7 @@ yy175:
yy176:
YYDEBUG(176, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1679 "Zend/zend_language_scanner.l"
+#line 1691 "Zend/zend_language_scanner.l"
{
while (YYCURSOR < YYLIMIT) {
switch (*YYCURSOR++) {
@@ -2861,14 +2873,14 @@ yy176:
return T_COMMENT;
}
-#line 2865 "Zend/zend_language_scanner.c"
+#line 2877 "Zend/zend_language_scanner.c"
yy177:
YYDEBUG(177, *YYCURSOR);
++YYCURSOR;
yy178:
YYDEBUG(178, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1770 "Zend/zend_language_scanner.l"
+#line 1782 "Zend/zend_language_scanner.l"
{
register char *s, *t;
char *end;
@@ -2938,14 +2950,14 @@ yy178:
#endif /* ZEND_MULTIBYTE */
return T_CONSTANT_ENCAPSED_STRING;
}
-#line 2942 "Zend/zend_language_scanner.c"
+#line 2954 "Zend/zend_language_scanner.c"
yy179:
YYDEBUG(179, *YYCURSOR);
++YYCURSOR;
yy180:
YYDEBUG(180, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1841 "Zend/zend_language_scanner.l"
+#line 1853 "Zend/zend_language_scanner.l"
{
int bprefix = (yytext[0] != '"') ? 1 : 0;
@@ -2986,24 +2998,24 @@ yy180:
BEGIN(ST_DOUBLE_QUOTES);
return '"';
}
-#line 2990 "Zend/zend_language_scanner.c"
+#line 3002 "Zend/zend_language_scanner.c"
yy181:
YYDEBUG(181, *YYCURSOR);
++YYCURSOR;
YYDEBUG(182, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1932 "Zend/zend_language_scanner.l"
+#line 1944 "Zend/zend_language_scanner.l"
{
BEGIN(ST_BACKQUOTE);
return '`';
}
-#line 3001 "Zend/zend_language_scanner.c"
+#line 3013 "Zend/zend_language_scanner.c"
yy183:
YYDEBUG(183, *YYCURSOR);
++YYCURSOR;
YYDEBUG(184, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2190 "Zend/zend_language_scanner.l"
+#line 2202 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -3012,7 +3024,7 @@ yy183:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 3016 "Zend/zend_language_scanner.c"
+#line 3028 "Zend/zend_language_scanner.c"
yy185:
YYDEBUG(185, *YYCURSOR);
++YYCURSOR;
@@ -3039,13 +3051,13 @@ yy187:
yy189:
YYDEBUG(189, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1369 "Zend/zend_language_scanner.l"
+#line 1381 "Zend/zend_language_scanner.l"
{
zendlval->value.dval = zend_strtod(yytext, NULL);
zendlval->type = IS_DOUBLE;
return T_DNUMBER;
}
-#line 3049 "Zend/zend_language_scanner.c"
+#line 3061 "Zend/zend_language_scanner.c"
yy190:
YYDEBUG(190, *YYCURSOR);
yyaccept = 2;
@@ -3130,7 +3142,7 @@ yy198:
}
YYDEBUG(200, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1329 "Zend/zend_language_scanner.l"
+#line 1341 "Zend/zend_language_scanner.l"
{
char *hex = yytext + 2; /* Skip "0x" */
int len = yyleng - 2;
@@ -3151,7 +3163,7 @@ yy198:
return T_DNUMBER;
}
}
-#line 3155 "Zend/zend_language_scanner.c"
+#line 3167 "Zend/zend_language_scanner.c"
yy201:
YYDEBUG(201, *YYCURSOR);
++YYCURSOR;
@@ -3160,7 +3172,7 @@ yy201:
yy202:
YYDEBUG(202, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1747 "Zend/zend_language_scanner.l"
+#line 1759 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -3168,7 +3180,7 @@ yy202:
BEGIN(INITIAL);
return T_CLOSE_TAG; /* implicit ';' at php-end tag */
}
-#line 3172 "Zend/zend_language_scanner.c"
+#line 3184 "Zend/zend_language_scanner.c"
yy203:
YYDEBUG(203, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3202,13 +3214,13 @@ yy205:
yy207:
YYDEBUG(207, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1649 "Zend/zend_language_scanner.l"
+#line 1661 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 3212 "Zend/zend_language_scanner.c"
+#line 3224 "Zend/zend_language_scanner.c"
yy208:
YYDEBUG(208, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3222,11 +3234,11 @@ yy209:
}
YYDEBUG(210, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1253 "Zend/zend_language_scanner.l"
+#line 1265 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_XOR;
}
-#line 3230 "Zend/zend_language_scanner.c"
+#line 3242 "Zend/zend_language_scanner.c"
yy211:
YYDEBUG(211, *YYCURSOR);
++YYCURSOR;
@@ -3235,61 +3247,61 @@ yy211:
}
YYDEBUG(212, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1245 "Zend/zend_language_scanner.l"
+#line 1257 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_OR;
}
-#line 3243 "Zend/zend_language_scanner.c"
+#line 3255 "Zend/zend_language_scanner.c"
yy213:
YYDEBUG(213, *YYCURSOR);
++YYCURSOR;
YYDEBUG(214, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1233 "Zend/zend_language_scanner.l"
+#line 1245 "Zend/zend_language_scanner.l"
{
return T_XOR_EQUAL;
}
-#line 3253 "Zend/zend_language_scanner.c"
+#line 3265 "Zend/zend_language_scanner.c"
yy215:
YYDEBUG(215, *YYCURSOR);
++YYCURSOR;
YYDEBUG(216, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1237 "Zend/zend_language_scanner.l"
+#line 1249 "Zend/zend_language_scanner.l"
{
return T_BOOLEAN_OR;
}
-#line 3263 "Zend/zend_language_scanner.c"
+#line 3275 "Zend/zend_language_scanner.c"
yy217:
YYDEBUG(217, *YYCURSOR);
++YYCURSOR;
YYDEBUG(218, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1229 "Zend/zend_language_scanner.l"
+#line 1241 "Zend/zend_language_scanner.l"
{
return T_OR_EQUAL;
}
-#line 3273 "Zend/zend_language_scanner.c"
+#line 3285 "Zend/zend_language_scanner.c"
yy219:
YYDEBUG(219, *YYCURSOR);
++YYCURSOR;
YYDEBUG(220, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1241 "Zend/zend_language_scanner.l"
+#line 1253 "Zend/zend_language_scanner.l"
{
return T_BOOLEAN_AND;
}
-#line 3283 "Zend/zend_language_scanner.c"
+#line 3295 "Zend/zend_language_scanner.c"
yy221:
YYDEBUG(221, *YYCURSOR);
++YYCURSOR;
YYDEBUG(222, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1225 "Zend/zend_language_scanner.l"
+#line 1237 "Zend/zend_language_scanner.l"
{
return T_AND_EQUAL;
}
-#line 3293 "Zend/zend_language_scanner.c"
+#line 3305 "Zend/zend_language_scanner.c"
yy223:
YYDEBUG(223, *YYCURSOR);
++YYCURSOR;
@@ -3298,7 +3310,7 @@ yy223:
yy224:
YYDEBUG(224, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1756 "Zend/zend_language_scanner.l"
+#line 1768 "Zend/zend_language_scanner.l"
{
if (CG(asp_tags)) {
BEGIN(INITIAL);
@@ -3311,17 +3323,17 @@ yy224:
return yytext[0];
}
}
-#line 3315 "Zend/zend_language_scanner.c"
+#line 3327 "Zend/zend_language_scanner.c"
yy225:
YYDEBUG(225, *YYCURSOR);
++YYCURSOR;
YYDEBUG(226, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1213 "Zend/zend_language_scanner.l"
+#line 1225 "Zend/zend_language_scanner.l"
{
return T_MOD_EQUAL;
}
-#line 3325 "Zend/zend_language_scanner.c"
+#line 3337 "Zend/zend_language_scanner.c"
yy227:
YYDEBUG(227, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3352,11 +3364,11 @@ yy231:
++YYCURSOR;
YYDEBUG(232, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1209 "Zend/zend_language_scanner.l"
+#line 1221 "Zend/zend_language_scanner.l"
{
return T_CONCAT_EQUAL;
}
-#line 3360 "Zend/zend_language_scanner.c"
+#line 3372 "Zend/zend_language_scanner.c"
yy233:
YYDEBUG(233, *YYCURSOR);
yyaccept = 4;
@@ -3365,7 +3377,7 @@ yy233:
yy234:
YYDEBUG(234, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1713 "Zend/zend_language_scanner.l"
+#line 1725 "Zend/zend_language_scanner.l"
{
int doc_com;
@@ -3399,7 +3411,7 @@ yy234:
return T_COMMENT;
}
-#line 3403 "Zend/zend_language_scanner.c"
+#line 3415 "Zend/zend_language_scanner.c"
yy235:
YYDEBUG(235, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3409,11 +3421,11 @@ yy236:
++YYCURSOR;
YYDEBUG(237, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1205 "Zend/zend_language_scanner.l"
+#line 1217 "Zend/zend_language_scanner.l"
{
return T_DIV_EQUAL;
}
-#line 3417 "Zend/zend_language_scanner.c"
+#line 3429 "Zend/zend_language_scanner.c"
yy238:
YYDEBUG(238, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3436,42 +3448,42 @@ yy241:
++YYCURSOR;
YYDEBUG(242, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1201 "Zend/zend_language_scanner.l"
+#line 1213 "Zend/zend_language_scanner.l"
{
return T_MUL_EQUAL;
}
-#line 3444 "Zend/zend_language_scanner.c"
+#line 3456 "Zend/zend_language_scanner.c"
yy243:
YYDEBUG(243, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '=') goto yy247;
YYDEBUG(244, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1261 "Zend/zend_language_scanner.l"
+#line 1273 "Zend/zend_language_scanner.l"
{
return T_SR;
}
-#line 3455 "Zend/zend_language_scanner.c"
+#line 3467 "Zend/zend_language_scanner.c"
yy245:
YYDEBUG(245, *YYCURSOR);
++YYCURSOR;
YYDEBUG(246, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1189 "Zend/zend_language_scanner.l"
+#line 1201 "Zend/zend_language_scanner.l"
{
return T_IS_GREATER_OR_EQUAL;
}
-#line 3465 "Zend/zend_language_scanner.c"
+#line 3477 "Zend/zend_language_scanner.c"
yy247:
YYDEBUG(247, *YYCURSOR);
++YYCURSOR;
YYDEBUG(248, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1221 "Zend/zend_language_scanner.l"
+#line 1233 "Zend/zend_language_scanner.l"
{
return T_SR_EQUAL;
}
-#line 3475 "Zend/zend_language_scanner.c"
+#line 3487 "Zend/zend_language_scanner.c"
yy249:
YYDEBUG(249, *YYCURSOR);
yyaccept = 5;
@@ -3482,11 +3494,11 @@ yy249:
yy250:
YYDEBUG(250, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1257 "Zend/zend_language_scanner.l"
+#line 1269 "Zend/zend_language_scanner.l"
{
return T_SL;
}
-#line 3490 "Zend/zend_language_scanner.c"
+#line 3502 "Zend/zend_language_scanner.c"
yy251:
YYDEBUG(251, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3498,22 +3510,22 @@ yy252:
++YYCURSOR;
YYDEBUG(253, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1185 "Zend/zend_language_scanner.l"
+#line 1197 "Zend/zend_language_scanner.l"
{
return T_IS_SMALLER_OR_EQUAL;
}
-#line 3506 "Zend/zend_language_scanner.c"
+#line 3518 "Zend/zend_language_scanner.c"
yy254:
YYDEBUG(254, *YYCURSOR);
++YYCURSOR;
yy255:
YYDEBUG(255, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1181 "Zend/zend_language_scanner.l"
+#line 1193 "Zend/zend_language_scanner.l"
{
return T_IS_NOT_EQUAL;
}
-#line 3517 "Zend/zend_language_scanner.c"
+#line 3529 "Zend/zend_language_scanner.c"
yy256:
YYDEBUG(256, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3564,11 +3576,11 @@ yy263:
++YYCURSOR;
YYDEBUG(264, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1217 "Zend/zend_language_scanner.l"
+#line 1229 "Zend/zend_language_scanner.l"
{
return T_SL_EQUAL;
}
-#line 3572 "Zend/zend_language_scanner.c"
+#line 3584 "Zend/zend_language_scanner.c"
yy265:
YYDEBUG(265, *YYCURSOR);
++YYCURSOR;
@@ -3673,7 +3685,7 @@ yy274:
yy275:
YYDEBUG(275, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1883 "Zend/zend_language_scanner.l"
+#line 1895 "Zend/zend_language_scanner.l"
{
char *s;
int bprefix = (yytext[0] != '<') ? 1 : 0;
@@ -3721,7 +3733,7 @@ yy275:
return T_START_HEREDOC;
}
-#line 3725 "Zend/zend_language_scanner.c"
+#line 3737 "Zend/zend_language_scanner.c"
yy276:
YYDEBUG(276, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3761,31 +3773,31 @@ yy279:
++YYCURSOR;
YYDEBUG(281, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1173 "Zend/zend_language_scanner.l"
+#line 1185 "Zend/zend_language_scanner.l"
{
return T_IS_NOT_IDENTICAL;
}
-#line 3769 "Zend/zend_language_scanner.c"
+#line 3781 "Zend/zend_language_scanner.c"
yy282:
YYDEBUG(282, *YYCURSOR);
++YYCURSOR;
YYDEBUG(283, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1193 "Zend/zend_language_scanner.l"
+#line 1205 "Zend/zend_language_scanner.l"
{
return T_PLUS_EQUAL;
}
-#line 3779 "Zend/zend_language_scanner.c"
+#line 3791 "Zend/zend_language_scanner.c"
yy284:
YYDEBUG(284, *YYCURSOR);
++YYCURSOR;
YYDEBUG(285, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1161 "Zend/zend_language_scanner.l"
+#line 1173 "Zend/zend_language_scanner.l"
{
return T_INC;
}
-#line 3789 "Zend/zend_language_scanner.c"
+#line 3801 "Zend/zend_language_scanner.c"
yy286:
YYDEBUG(286, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3804,42 +3816,42 @@ yy288:
}
YYDEBUG(289, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1153 "Zend/zend_language_scanner.l"
+#line 1165 "Zend/zend_language_scanner.l"
{
return T_LIST;
}
-#line 3812 "Zend/zend_language_scanner.c"
+#line 3824 "Zend/zend_language_scanner.c"
yy290:
YYDEBUG(290, *YYCURSOR);
++YYCURSOR;
if ((yych = *YYCURSOR) == '=') goto yy294;
YYDEBUG(291, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1177 "Zend/zend_language_scanner.l"
+#line 1189 "Zend/zend_language_scanner.l"
{
return T_IS_EQUAL;
}
-#line 3823 "Zend/zend_language_scanner.c"
+#line 3835 "Zend/zend_language_scanner.c"
yy292:
YYDEBUG(292, *YYCURSOR);
++YYCURSOR;
YYDEBUG(293, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1149 "Zend/zend_language_scanner.l"
+#line 1161 "Zend/zend_language_scanner.l"
{
return T_DOUBLE_ARROW;
}
-#line 3833 "Zend/zend_language_scanner.c"
+#line 3845 "Zend/zend_language_scanner.c"
yy294:
YYDEBUG(294, *YYCURSOR);
++YYCURSOR;
YYDEBUG(295, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1169 "Zend/zend_language_scanner.l"
+#line 1181 "Zend/zend_language_scanner.l"
{
return T_IS_IDENTICAL;
}
-#line 3843 "Zend/zend_language_scanner.c"
+#line 3855 "Zend/zend_language_scanner.c"
yy296:
YYDEBUG(296, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3961,7 +3973,7 @@ yy311:
}
YYDEBUG(314, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1473 "Zend/zend_language_scanner.l"
+#line 1485 "Zend/zend_language_scanner.l"
{
if (CG(current_namespace)) {
*zendlval = *CG(current_namespace);
@@ -3971,7 +3983,7 @@ yy311:
}
return T_NS_C;
}
-#line 3975 "Zend/zend_language_scanner.c"
+#line 3987 "Zend/zend_language_scanner.c"
yy315:
YYDEBUG(315, *YYCURSOR);
yych = *++YYCURSOR;
@@ -3991,7 +4003,7 @@ yy316:
}
YYDEBUG(319, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1446 "Zend/zend_language_scanner.l"
+#line 1458 "Zend/zend_language_scanner.l"
{
char *filename = zend_get_compiled_filename(TSRMLS_C);
const size_t filename_len = strlen(filename);
@@ -4018,7 +4030,7 @@ yy316:
zendlval->type = IS_STRING;
return T_DIR;
}
-#line 4022 "Zend/zend_language_scanner.c"
+#line 4034 "Zend/zend_language_scanner.c"
yy320:
YYDEBUG(320, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4043,13 +4055,13 @@ yy322:
}
YYDEBUG(325, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1428 "Zend/zend_language_scanner.l"
+#line 1440 "Zend/zend_language_scanner.l"
{
zendlval->value.lval = CG(zend_lineno);
zendlval->type = IS_LONG;
return T_LINE;
}
-#line 4053 "Zend/zend_language_scanner.c"
+#line 4065 "Zend/zend_language_scanner.c"
yy326:
YYDEBUG(326, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4084,7 +4096,7 @@ yy330:
}
YYDEBUG(333, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1407 "Zend/zend_language_scanner.l"
+#line 1419 "Zend/zend_language_scanner.l"
{
char *class_name = CG(active_class_entry) ? CG(active_class_entry)->name : NULL;
char *func_name = CG(active_op_array)? CG(active_op_array)->function_name : NULL;
@@ -4105,7 +4117,7 @@ yy330:
zendlval->type = IS_STRING;
return T_METHOD_C;
}
-#line 4109 "Zend/zend_language_scanner.c"
+#line 4121 "Zend/zend_language_scanner.c"
yy334:
YYDEBUG(334, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4156,7 +4168,7 @@ yy341:
}
YYDEBUG(344, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1391 "Zend/zend_language_scanner.l"
+#line 1403 "Zend/zend_language_scanner.l"
{
char *func_name = NULL;
@@ -4172,7 +4184,7 @@ yy341:
zendlval->type = IS_STRING;
return T_FUNC_C;
}
-#line 4176 "Zend/zend_language_scanner.c"
+#line 4188 "Zend/zend_language_scanner.c"
yy345:
YYDEBUG(345, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4192,7 +4204,7 @@ yy346:
}
YYDEBUG(349, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1434 "Zend/zend_language_scanner.l"
+#line 1446 "Zend/zend_language_scanner.l"
{
char *filename = zend_get_compiled_filename(TSRMLS_C);
@@ -4204,7 +4216,7 @@ yy346:
zendlval->type = IS_STRING;
return T_FILE;
}
-#line 4208 "Zend/zend_language_scanner.c"
+#line 4220 "Zend/zend_language_scanner.c"
yy350:
YYDEBUG(350, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4234,7 +4246,7 @@ yy353:
}
YYDEBUG(356, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1375 "Zend/zend_language_scanner.l"
+#line 1387 "Zend/zend_language_scanner.l"
{
char *class_name = NULL;
@@ -4250,7 +4262,7 @@ yy353:
zendlval->type = IS_STRING;
return T_CLASS_C;
}
-#line 4254 "Zend/zend_language_scanner.c"
+#line 4266 "Zend/zend_language_scanner.c"
yy357:
YYDEBUG(357, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4312,11 +4324,11 @@ yy368:
}
YYDEBUG(369, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1117 "Zend/zend_language_scanner.l"
+#line 1129 "Zend/zend_language_scanner.l"
{
return T_HALT_COMPILER;
}
-#line 4320 "Zend/zend_language_scanner.c"
+#line 4332 "Zend/zend_language_scanner.c"
yy370:
YYDEBUG(370, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4336,11 +4348,11 @@ yy372:
}
YYDEBUG(373, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1101 "Zend/zend_language_scanner.l"
+#line 1113 "Zend/zend_language_scanner.l"
{
return T_USE;
}
-#line 4344 "Zend/zend_language_scanner.c"
+#line 4356 "Zend/zend_language_scanner.c"
yy374:
YYDEBUG(374, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4359,11 +4371,11 @@ yy376:
}
YYDEBUG(377, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1145 "Zend/zend_language_scanner.l"
+#line 1157 "Zend/zend_language_scanner.l"
{
return T_UNSET;
}
-#line 4367 "Zend/zend_language_scanner.c"
+#line 4379 "Zend/zend_language_scanner.c"
yy378:
YYDEBUG(378, *YYCURSOR);
++YYCURSOR;
@@ -4535,11 +4547,11 @@ yy393:
++YYCURSOR;
YYDEBUG(395, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1045 "Zend/zend_language_scanner.l"
+#line 1057 "Zend/zend_language_scanner.l"
{
return T_INT_CAST;
}
-#line 4543 "Zend/zend_language_scanner.c"
+#line 4555 "Zend/zend_language_scanner.c"
yy396:
YYDEBUG(396, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4583,11 +4595,11 @@ yy401:
++YYCURSOR;
YYDEBUG(404, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1049 "Zend/zend_language_scanner.l"
+#line 1061 "Zend/zend_language_scanner.l"
{
return T_DOUBLE_CAST;
}
-#line 4591 "Zend/zend_language_scanner.c"
+#line 4603 "Zend/zend_language_scanner.c"
yy405:
YYDEBUG(405, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4657,11 +4669,11 @@ yy415:
++YYCURSOR;
YYDEBUG(418, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1053 "Zend/zend_language_scanner.l"
+#line 1065 "Zend/zend_language_scanner.l"
{
return T_STRING_CAST;
}
-#line 4665 "Zend/zend_language_scanner.c"
+#line 4677 "Zend/zend_language_scanner.c"
yy419:
YYDEBUG(419, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4694,11 +4706,11 @@ yy422:
++YYCURSOR;
YYDEBUG(425, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1061 "Zend/zend_language_scanner.l"
+#line 1073 "Zend/zend_language_scanner.l"
{
return T_ARRAY_CAST;
}
-#line 4702 "Zend/zend_language_scanner.c"
+#line 4714 "Zend/zend_language_scanner.c"
yy426:
YYDEBUG(426, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4736,11 +4748,11 @@ yy430:
++YYCURSOR;
YYDEBUG(433, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1065 "Zend/zend_language_scanner.l"
+#line 1077 "Zend/zend_language_scanner.l"
{
return T_OBJECT_CAST;
}
-#line 4744 "Zend/zend_language_scanner.c"
+#line 4756 "Zend/zend_language_scanner.c"
yy434:
YYDEBUG(434, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4781,11 +4793,11 @@ yy439:
++YYCURSOR;
YYDEBUG(441, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1069 "Zend/zend_language_scanner.l"
+#line 1081 "Zend/zend_language_scanner.l"
{
return T_BOOL_CAST;
}
-#line 4789 "Zend/zend_language_scanner.c"
+#line 4801 "Zend/zend_language_scanner.c"
yy442:
YYDEBUG(442, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4829,11 +4841,11 @@ yy447:
++YYCURSOR;
YYDEBUG(450, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1057 "Zend/zend_language_scanner.l"
+#line 1069 "Zend/zend_language_scanner.l"
{
return T_STRING_CAST;
}
-#line 4837 "Zend/zend_language_scanner.c"
+#line 4849 "Zend/zend_language_scanner.c"
yy451:
YYDEBUG(451, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4866,11 +4878,11 @@ yy454:
++YYCURSOR;
YYDEBUG(457, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1073 "Zend/zend_language_scanner.l"
+#line 1085 "Zend/zend_language_scanner.l"
{
return T_UNSET_CAST;
}
-#line 4874 "Zend/zend_language_scanner.c"
+#line 4886 "Zend/zend_language_scanner.c"
yy458:
YYDEBUG(458, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4884,11 +4896,11 @@ yy459:
}
YYDEBUG(460, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1041 "Zend/zend_language_scanner.l"
+#line 1053 "Zend/zend_language_scanner.l"
{
return T_VAR;
}
-#line 4892 "Zend/zend_language_scanner.c"
+#line 4904 "Zend/zend_language_scanner.c"
yy461:
YYDEBUG(461, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4908,11 +4920,11 @@ yy463:
}
YYDEBUG(464, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1033 "Zend/zend_language_scanner.l"
+#line 1045 "Zend/zend_language_scanner.l"
{
return T_NEW;
}
-#line 4916 "Zend/zend_language_scanner.c"
+#line 4928 "Zend/zend_language_scanner.c"
yy465:
YYDEBUG(465, *YYCURSOR);
yych = *++YYCURSOR;
@@ -4951,21 +4963,21 @@ yy471:
}
YYDEBUG(472, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1097 "Zend/zend_language_scanner.l"
+#line 1109 "Zend/zend_language_scanner.l"
{
return T_NAMESPACE;
}
-#line 4959 "Zend/zend_language_scanner.c"
+#line 4971 "Zend/zend_language_scanner.c"
yy473:
YYDEBUG(473, *YYCURSOR);
++YYCURSOR;
YYDEBUG(474, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1025 "Zend/zend_language_scanner.l"
+#line 1037 "Zend/zend_language_scanner.l"
{
return T_PAAMAYIM_NEKUDOTAYIM;
}
-#line 4969 "Zend/zend_language_scanner.c"
+#line 4981 "Zend/zend_language_scanner.c"
yy475:
YYDEBUG(475, *YYCURSOR);
++YYCURSOR;
@@ -4987,32 +4999,32 @@ yy477:
++YYCURSOR;
YYDEBUG(478, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1197 "Zend/zend_language_scanner.l"
+#line 1209 "Zend/zend_language_scanner.l"
{
return T_MINUS_EQUAL;
}
-#line 4995 "Zend/zend_language_scanner.c"
+#line 5007 "Zend/zend_language_scanner.c"
yy479:
YYDEBUG(479, *YYCURSOR);
++YYCURSOR;
YYDEBUG(480, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1165 "Zend/zend_language_scanner.l"
+#line 1177 "Zend/zend_language_scanner.l"
{
return T_DEC;
}
-#line 5005 "Zend/zend_language_scanner.c"
+#line 5017 "Zend/zend_language_scanner.c"
yy481:
YYDEBUG(481, *YYCURSOR);
++YYCURSOR;
YYDEBUG(482, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 995 "Zend/zend_language_scanner.l"
+#line 1007 "Zend/zend_language_scanner.l"
{
yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC);
return T_OBJECT_OPERATOR;
}
-#line 5016 "Zend/zend_language_scanner.c"
+#line 5028 "Zend/zend_language_scanner.c"
yy483:
YYDEBUG(483, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5057,11 +5069,11 @@ yy488:
}
YYDEBUG(489, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1141 "Zend/zend_language_scanner.l"
+#line 1153 "Zend/zend_language_scanner.l"
{
return T_PUBLIC;
}
-#line 5065 "Zend/zend_language_scanner.c"
+#line 5077 "Zend/zend_language_scanner.c"
yy490:
YYDEBUG(490, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5116,11 +5128,11 @@ yy497:
}
YYDEBUG(498, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1137 "Zend/zend_language_scanner.l"
+#line 1149 "Zend/zend_language_scanner.l"
{
return T_PROTECTED;
}
-#line 5124 "Zend/zend_language_scanner.c"
+#line 5136 "Zend/zend_language_scanner.c"
yy499:
YYDEBUG(499, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5150,11 +5162,11 @@ yy503:
}
YYDEBUG(504, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1133 "Zend/zend_language_scanner.l"
+#line 1145 "Zend/zend_language_scanner.l"
{
return T_PRIVATE;
}
-#line 5158 "Zend/zend_language_scanner.c"
+#line 5170 "Zend/zend_language_scanner.c"
yy505:
YYDEBUG(505, *YYCURSOR);
++YYCURSOR;
@@ -5163,11 +5175,11 @@ yy505:
}
YYDEBUG(506, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 975 "Zend/zend_language_scanner.l"
+#line 987 "Zend/zend_language_scanner.l"
{
return T_PRINT;
}
-#line 5171 "Zend/zend_language_scanner.c"
+#line 5183 "Zend/zend_language_scanner.c"
yy507:
YYDEBUG(507, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5192,11 +5204,11 @@ yy510:
}
YYDEBUG(511, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 967 "Zend/zend_language_scanner.l"
+#line 979 "Zend/zend_language_scanner.l"
{
return T_GOTO;
}
-#line 5200 "Zend/zend_language_scanner.c"
+#line 5212 "Zend/zend_language_scanner.c"
yy512:
YYDEBUG(512, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5220,11 +5232,11 @@ yy515:
}
YYDEBUG(516, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1105 "Zend/zend_language_scanner.l"
+#line 1117 "Zend/zend_language_scanner.l"
{
return T_GLOBAL;
}
-#line 5228 "Zend/zend_language_scanner.c"
+#line 5240 "Zend/zend_language_scanner.c"
yy517:
YYDEBUG(517, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5261,11 +5273,11 @@ yy523:
}
YYDEBUG(524, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 959 "Zend/zend_language_scanner.l"
+#line 971 "Zend/zend_language_scanner.l"
{
return T_BREAK;
}
-#line 5269 "Zend/zend_language_scanner.c"
+#line 5281 "Zend/zend_language_scanner.c"
yy525:
YYDEBUG(525, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5305,11 +5317,11 @@ yy531:
}
YYDEBUG(532, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 943 "Zend/zend_language_scanner.l"
+#line 955 "Zend/zend_language_scanner.l"
{
return T_SWITCH;
}
-#line 5313 "Zend/zend_language_scanner.c"
+#line 5325 "Zend/zend_language_scanner.c"
yy533:
YYDEBUG(533, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5333,11 +5345,11 @@ yy536:
}
YYDEBUG(537, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1121 "Zend/zend_language_scanner.l"
+#line 1133 "Zend/zend_language_scanner.l"
{
return T_STATIC;
}
-#line 5341 "Zend/zend_language_scanner.c"
+#line 5353 "Zend/zend_language_scanner.c"
yy538:
YYDEBUG(538, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5364,11 +5376,11 @@ yy541:
}
YYDEBUG(542, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 939 "Zend/zend_language_scanner.l"
+#line 951 "Zend/zend_language_scanner.l"
{
return T_AS;
}
-#line 5372 "Zend/zend_language_scanner.c"
+#line 5384 "Zend/zend_language_scanner.c"
yy543:
YYDEBUG(543, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5387,11 +5399,11 @@ yy545:
}
YYDEBUG(546, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1157 "Zend/zend_language_scanner.l"
+#line 1169 "Zend/zend_language_scanner.l"
{
return T_ARRAY;
}
-#line 5395 "Zend/zend_language_scanner.c"
+#line 5407 "Zend/zend_language_scanner.c"
yy547:
YYDEBUG(547, *YYCURSOR);
++YYCURSOR;
@@ -5400,11 +5412,11 @@ yy547:
}
YYDEBUG(548, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1249 "Zend/zend_language_scanner.l"
+#line 1261 "Zend/zend_language_scanner.l"
{
return T_LOGICAL_AND;
}
-#line 5408 "Zend/zend_language_scanner.c"
+#line 5420 "Zend/zend_language_scanner.c"
yy549:
YYDEBUG(549, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5438,11 +5450,11 @@ yy554:
}
YYDEBUG(555, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1125 "Zend/zend_language_scanner.l"
+#line 1137 "Zend/zend_language_scanner.l"
{
return T_ABSTRACT;
}
-#line 5446 "Zend/zend_language_scanner.c"
+#line 5458 "Zend/zend_language_scanner.c"
yy556:
YYDEBUG(556, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5466,11 +5478,11 @@ yy559:
}
YYDEBUG(560, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 899 "Zend/zend_language_scanner.l"
+#line 911 "Zend/zend_language_scanner.l"
{
return T_WHILE;
}
-#line 5474 "Zend/zend_language_scanner.c"
+#line 5486 "Zend/zend_language_scanner.c"
yy561:
YYDEBUG(561, *YYCURSOR);
++YYCURSOR;
@@ -5479,11 +5491,11 @@ yy561:
}
YYDEBUG(562, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 883 "Zend/zend_language_scanner.l"
+#line 895 "Zend/zend_language_scanner.l"
{
return T_IF;
}
-#line 5487 "Zend/zend_language_scanner.c"
+#line 5499 "Zend/zend_language_scanner.c"
yy563:
YYDEBUG(563, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5535,11 +5547,11 @@ yy568:
}
YYDEBUG(569, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1109 "Zend/zend_language_scanner.l"
+#line 1121 "Zend/zend_language_scanner.l"
{
return T_ISSET;
}
-#line 5543 "Zend/zend_language_scanner.c"
+#line 5555 "Zend/zend_language_scanner.c"
yy570:
YYDEBUG(570, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5593,11 +5605,11 @@ yy576:
yy577:
YYDEBUG(577, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1081 "Zend/zend_language_scanner.l"
+#line 1093 "Zend/zend_language_scanner.l"
{
return T_INCLUDE;
}
-#line 5601 "Zend/zend_language_scanner.c"
+#line 5613 "Zend/zend_language_scanner.c"
yy578:
YYDEBUG(578, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5626,11 +5638,11 @@ yy582:
}
YYDEBUG(583, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1085 "Zend/zend_language_scanner.l"
+#line 1097 "Zend/zend_language_scanner.l"
{
return T_INCLUDE_ONCE;
}
-#line 5634 "Zend/zend_language_scanner.c"
+#line 5646 "Zend/zend_language_scanner.c"
yy584:
YYDEBUG(584, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5664,11 +5676,11 @@ yy589:
}
YYDEBUG(590, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 983 "Zend/zend_language_scanner.l"
+#line 995 "Zend/zend_language_scanner.l"
{
return T_INTERFACE;
}
-#line 5672 "Zend/zend_language_scanner.c"
+#line 5684 "Zend/zend_language_scanner.c"
yy591:
YYDEBUG(591, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5707,11 +5719,11 @@ yy597:
}
YYDEBUG(598, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 935 "Zend/zend_language_scanner.l"
+#line 947 "Zend/zend_language_scanner.l"
{
return T_INSTANCEOF;
}
-#line 5715 "Zend/zend_language_scanner.c"
+#line 5727 "Zend/zend_language_scanner.c"
yy599:
YYDEBUG(599, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5755,11 +5767,11 @@ yy606:
}
YYDEBUG(607, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 991 "Zend/zend_language_scanner.l"
+#line 1003 "Zend/zend_language_scanner.l"
{
return T_IMPLEMENTS;
}
-#line 5763 "Zend/zend_language_scanner.c"
+#line 5775 "Zend/zend_language_scanner.c"
yy608:
YYDEBUG(608, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5779,11 +5791,11 @@ yy610:
}
YYDEBUG(611, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 871 "Zend/zend_language_scanner.l"
+#line 883 "Zend/zend_language_scanner.l"
{
return T_TRY;
}
-#line 5787 "Zend/zend_language_scanner.c"
+#line 5799 "Zend/zend_language_scanner.c"
yy612:
YYDEBUG(612, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5802,11 +5814,11 @@ yy614:
}
YYDEBUG(615, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 879 "Zend/zend_language_scanner.l"
+#line 891 "Zend/zend_language_scanner.l"
{
return T_THROW;
}
-#line 5810 "Zend/zend_language_scanner.c"
+#line 5822 "Zend/zend_language_scanner.c"
yy616:
YYDEBUG(616, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5867,11 +5879,11 @@ yy622:
yy623:
YYDEBUG(623, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1089 "Zend/zend_language_scanner.l"
+#line 1101 "Zend/zend_language_scanner.l"
{
return T_REQUIRE;
}
-#line 5875 "Zend/zend_language_scanner.c"
+#line 5887 "Zend/zend_language_scanner.c"
yy624:
YYDEBUG(624, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5900,11 +5912,11 @@ yy628:
}
YYDEBUG(629, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1093 "Zend/zend_language_scanner.l"
+#line 1105 "Zend/zend_language_scanner.l"
{
return T_REQUIRE_ONCE;
}
-#line 5908 "Zend/zend_language_scanner.c"
+#line 5920 "Zend/zend_language_scanner.c"
yy630:
YYDEBUG(630, *YYCURSOR);
yych = *++YYCURSOR;
@@ -5923,11 +5935,11 @@ yy632:
}
YYDEBUG(633, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 867 "Zend/zend_language_scanner.l"
+#line 879 "Zend/zend_language_scanner.l"
{
return T_RETURN;
}
-#line 5931 "Zend/zend_language_scanner.c"
+#line 5943 "Zend/zend_language_scanner.c"
yy634:
YYDEBUG(634, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6008,11 +6020,11 @@ yy643:
}
YYDEBUG(644, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 963 "Zend/zend_language_scanner.l"
+#line 975 "Zend/zend_language_scanner.l"
{
return T_CONTINUE;
}
-#line 6016 "Zend/zend_language_scanner.c"
+#line 6028 "Zend/zend_language_scanner.c"
yy645:
YYDEBUG(645, *YYCURSOR);
++YYCURSOR;
@@ -6021,11 +6033,11 @@ yy645:
}
YYDEBUG(646, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 863 "Zend/zend_language_scanner.l"
+#line 875 "Zend/zend_language_scanner.l"
{
return T_CONST;
}
-#line 6029 "Zend/zend_language_scanner.c"
+#line 6041 "Zend/zend_language_scanner.c"
yy647:
YYDEBUG(647, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6050,11 +6062,11 @@ yy650:
}
YYDEBUG(651, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1037 "Zend/zend_language_scanner.l"
+#line 1049 "Zend/zend_language_scanner.l"
{
return T_CLONE;
}
-#line 6058 "Zend/zend_language_scanner.c"
+#line 6070 "Zend/zend_language_scanner.c"
yy652:
YYDEBUG(652, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6068,11 +6080,11 @@ yy653:
}
YYDEBUG(654, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 979 "Zend/zend_language_scanner.l"
+#line 991 "Zend/zend_language_scanner.l"
{
return T_CLASS;
}
-#line 6076 "Zend/zend_language_scanner.c"
+#line 6088 "Zend/zend_language_scanner.c"
yy655:
YYDEBUG(655, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6092,11 +6104,11 @@ yy657:
}
YYDEBUG(658, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 951 "Zend/zend_language_scanner.l"
+#line 963 "Zend/zend_language_scanner.l"
{
return T_CASE;
}
-#line 6100 "Zend/zend_language_scanner.c"
+#line 6112 "Zend/zend_language_scanner.c"
yy659:
YYDEBUG(659, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6110,11 +6122,11 @@ yy660:
}
YYDEBUG(661, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 875 "Zend/zend_language_scanner.l"
+#line 887 "Zend/zend_language_scanner.l"
{
return T_CATCH;
}
-#line 6118 "Zend/zend_language_scanner.c"
+#line 6130 "Zend/zend_language_scanner.c"
yy662:
YYDEBUG(662, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6165,11 +6177,11 @@ yy670:
}
YYDEBUG(671, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 859 "Zend/zend_language_scanner.l"
+#line 871 "Zend/zend_language_scanner.l"
{
return T_FUNCTION;
}
-#line 6173 "Zend/zend_language_scanner.c"
+#line 6185 "Zend/zend_language_scanner.c"
yy672:
YYDEBUG(672, *YYCURSOR);
++YYCURSOR;
@@ -6193,11 +6205,11 @@ yy672:
yy673:
YYDEBUG(673, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 911 "Zend/zend_language_scanner.l"
+#line 923 "Zend/zend_language_scanner.l"
{
return T_FOR;
}
-#line 6201 "Zend/zend_language_scanner.c"
+#line 6213 "Zend/zend_language_scanner.c"
yy674:
YYDEBUG(674, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6221,11 +6233,11 @@ yy677:
}
YYDEBUG(678, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 919 "Zend/zend_language_scanner.l"
+#line 931 "Zend/zend_language_scanner.l"
{
return T_FOREACH;
}
-#line 6229 "Zend/zend_language_scanner.c"
+#line 6241 "Zend/zend_language_scanner.c"
yy679:
YYDEBUG(679, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6244,11 +6256,11 @@ yy681:
}
YYDEBUG(682, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1129 "Zend/zend_language_scanner.l"
+#line 1141 "Zend/zend_language_scanner.l"
{
return T_FINAL;
}
-#line 6252 "Zend/zend_language_scanner.c"
+#line 6264 "Zend/zend_language_scanner.c"
yy683:
YYDEBUG(683, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6279,11 +6291,11 @@ yy685:
}
YYDEBUG(686, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 907 "Zend/zend_language_scanner.l"
+#line 919 "Zend/zend_language_scanner.l"
{
return T_DO;
}
-#line 6287 "Zend/zend_language_scanner.c"
+#line 6299 "Zend/zend_language_scanner.c"
yy687:
YYDEBUG(687, *YYCURSOR);
++YYCURSOR;
@@ -6292,11 +6304,11 @@ yy687:
}
YYDEBUG(688, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 855 "Zend/zend_language_scanner.l"
+#line 867 "Zend/zend_language_scanner.l"
{
return T_EXIT;
}
-#line 6300 "Zend/zend_language_scanner.c"
+#line 6312 "Zend/zend_language_scanner.c"
yy689:
YYDEBUG(689, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6331,11 +6343,11 @@ yy694:
}
YYDEBUG(695, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 955 "Zend/zend_language_scanner.l"
+#line 967 "Zend/zend_language_scanner.l"
{
return T_DEFAULT;
}
-#line 6339 "Zend/zend_language_scanner.c"
+#line 6351 "Zend/zend_language_scanner.c"
yy696:
YYDEBUG(696, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6359,11 +6371,11 @@ yy699:
}
YYDEBUG(700, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 927 "Zend/zend_language_scanner.l"
+#line 939 "Zend/zend_language_scanner.l"
{
return T_DECLARE;
}
-#line 6367 "Zend/zend_language_scanner.c"
+#line 6379 "Zend/zend_language_scanner.c"
yy701:
YYDEBUG(701, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6443,11 +6455,11 @@ yy712:
}
YYDEBUG(713, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 987 "Zend/zend_language_scanner.l"
+#line 999 "Zend/zend_language_scanner.l"
{
return T_EXTENDS;
}
-#line 6451 "Zend/zend_language_scanner.c"
+#line 6463 "Zend/zend_language_scanner.c"
yy714:
YYDEBUG(714, *YYCURSOR);
++YYCURSOR;
@@ -6456,11 +6468,11 @@ yy714:
}
YYDEBUG(715, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 851 "Zend/zend_language_scanner.l"
+#line 863 "Zend/zend_language_scanner.l"
{
return T_EXIT;
}
-#line 6464 "Zend/zend_language_scanner.c"
+#line 6476 "Zend/zend_language_scanner.c"
yy716:
YYDEBUG(716, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6474,11 +6486,11 @@ yy717:
}
YYDEBUG(718, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1077 "Zend/zend_language_scanner.l"
+#line 1089 "Zend/zend_language_scanner.l"
{
return T_EVAL;
}
-#line 6482 "Zend/zend_language_scanner.c"
+#line 6494 "Zend/zend_language_scanner.c"
yy719:
YYDEBUG(719, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6548,11 +6560,11 @@ yy728:
}
YYDEBUG(729, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 903 "Zend/zend_language_scanner.l"
+#line 915 "Zend/zend_language_scanner.l"
{
return T_ENDWHILE;
}
-#line 6556 "Zend/zend_language_scanner.c"
+#line 6568 "Zend/zend_language_scanner.c"
yy730:
YYDEBUG(730, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6581,11 +6593,11 @@ yy734:
}
YYDEBUG(735, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 947 "Zend/zend_language_scanner.l"
+#line 959 "Zend/zend_language_scanner.l"
{
return T_ENDSWITCH;
}
-#line 6589 "Zend/zend_language_scanner.c"
+#line 6601 "Zend/zend_language_scanner.c"
yy736:
YYDEBUG(736, *YYCURSOR);
++YYCURSOR;
@@ -6594,11 +6606,11 @@ yy736:
}
YYDEBUG(737, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 891 "Zend/zend_language_scanner.l"
+#line 903 "Zend/zend_language_scanner.l"
{
return T_ENDIF;
}
-#line 6602 "Zend/zend_language_scanner.c"
+#line 6614 "Zend/zend_language_scanner.c"
yy738:
YYDEBUG(738, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6627,11 +6639,11 @@ yy739:
yy740:
YYDEBUG(740, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 915 "Zend/zend_language_scanner.l"
+#line 927 "Zend/zend_language_scanner.l"
{
return T_ENDFOR;
}
-#line 6635 "Zend/zend_language_scanner.c"
+#line 6647 "Zend/zend_language_scanner.c"
yy741:
YYDEBUG(741, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6655,11 +6667,11 @@ yy744:
}
YYDEBUG(745, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 923 "Zend/zend_language_scanner.l"
+#line 935 "Zend/zend_language_scanner.l"
{
return T_ENDFOREACH;
}
-#line 6663 "Zend/zend_language_scanner.c"
+#line 6675 "Zend/zend_language_scanner.c"
yy746:
YYDEBUG(746, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6693,11 +6705,11 @@ yy751:
}
YYDEBUG(752, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 931 "Zend/zend_language_scanner.l"
+#line 943 "Zend/zend_language_scanner.l"
{
return T_ENDDECLARE;
}
-#line 6701 "Zend/zend_language_scanner.c"
+#line 6713 "Zend/zend_language_scanner.c"
yy753:
YYDEBUG(753, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6716,11 +6728,11 @@ yy755:
}
YYDEBUG(756, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1113 "Zend/zend_language_scanner.l"
+#line 1125 "Zend/zend_language_scanner.l"
{
return T_EMPTY;
}
-#line 6724 "Zend/zend_language_scanner.c"
+#line 6736 "Zend/zend_language_scanner.c"
yy757:
YYDEBUG(757, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6749,11 +6761,11 @@ yy758:
yy759:
YYDEBUG(759, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 895 "Zend/zend_language_scanner.l"
+#line 907 "Zend/zend_language_scanner.l"
{
return T_ELSE;
}
-#line 6757 "Zend/zend_language_scanner.c"
+#line 6769 "Zend/zend_language_scanner.c"
yy760:
YYDEBUG(760, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6767,11 +6779,11 @@ yy761:
}
YYDEBUG(762, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 887 "Zend/zend_language_scanner.l"
+#line 899 "Zend/zend_language_scanner.l"
{
return T_ELSEIF;
}
-#line 6775 "Zend/zend_language_scanner.c"
+#line 6787 "Zend/zend_language_scanner.c"
yy763:
YYDEBUG(763, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6785,11 +6797,11 @@ yy764:
}
YYDEBUG(765, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 971 "Zend/zend_language_scanner.l"
+#line 983 "Zend/zend_language_scanner.l"
{
return T_ECHO;
}
-#line 6793 "Zend/zend_language_scanner.c"
+#line 6805 "Zend/zend_language_scanner.c"
}
/* *********************************** */
yyc_ST_LOOKING_FOR_PROPERTY:
@@ -6862,7 +6874,7 @@ yy768:
yy769:
YYDEBUG(769, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1000 "Zend/zend_language_scanner.l"
+#line 1012 "Zend/zend_language_scanner.l"
{
zendlval->value.str.val = yytext; /* no copying - intentional */
zendlval->value.str.len = yyleng;
@@ -6870,7 +6882,7 @@ yy769:
HANDLE_NEWLINES(yytext, yyleng);
return T_WHITESPACE;
}
-#line 6874 "Zend/zend_language_scanner.c"
+#line 6886 "Zend/zend_language_scanner.c"
yy770:
YYDEBUG(770, *YYCURSOR);
++YYCURSOR;
@@ -6878,13 +6890,13 @@ yy770:
yy771:
YYDEBUG(771, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1019 "Zend/zend_language_scanner.l"
+#line 1031 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state(TSRMLS_C);
goto restart;
}
-#line 6888 "Zend/zend_language_scanner.c"
+#line 6900 "Zend/zend_language_scanner.c"
yy772:
YYDEBUG(772, *YYCURSOR);
++YYCURSOR;
@@ -6893,14 +6905,14 @@ yy772:
yy773:
YYDEBUG(773, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1012 "Zend/zend_language_scanner.l"
+#line 1024 "Zend/zend_language_scanner.l"
{
yy_pop_state(TSRMLS_C);
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 6904 "Zend/zend_language_scanner.c"
+#line 6916 "Zend/zend_language_scanner.c"
yy774:
YYDEBUG(774, *YYCURSOR);
yych = *++YYCURSOR;
@@ -6921,11 +6933,11 @@ yy777:
++YYCURSOR;
YYDEBUG(778, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1008 "Zend/zend_language_scanner.l"
+#line 1020 "Zend/zend_language_scanner.l"
{
return T_OBJECT_OPERATOR;
}
-#line 6929 "Zend/zend_language_scanner.c"
+#line 6941 "Zend/zend_language_scanner.c"
yy779:
YYDEBUG(779, *YYCURSOR);
++YYCURSOR;
@@ -6995,7 +7007,7 @@ yy783:
yy784:
YYDEBUG(784, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1291 "Zend/zend_language_scanner.l"
+#line 1303 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
@@ -7003,20 +7015,20 @@ yy784:
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
return T_STRING_VARNAME;
}
-#line 7007 "Zend/zend_language_scanner.c"
+#line 7019 "Zend/zend_language_scanner.c"
yy785:
YYDEBUG(785, *YYCURSOR);
++YYCURSOR;
YYDEBUG(786, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1300 "Zend/zend_language_scanner.l"
+#line 1312 "Zend/zend_language_scanner.l"
{
yyless(0);
yy_pop_state(TSRMLS_C);
yy_push_state(ST_IN_SCRIPTING TSRMLS_CC);
goto restart;
}
-#line 7020 "Zend/zend_language_scanner.c"
+#line 7032 "Zend/zend_language_scanner.c"
yy787:
YYDEBUG(787, *YYCURSOR);
++YYCURSOR;
@@ -7038,7 +7050,7 @@ yyc_ST_NOWDOC:
++YYCURSOR;
YYDEBUG(792, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2134 "Zend/zend_language_scanner.l"
+#line 2146 "Zend/zend_language_scanner.l"
{
int newline = 0;
@@ -7093,7 +7105,7 @@ nowdoc_scan_done:
HANDLE_NEWLINES(yytext, yyleng - newline);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 7097 "Zend/zend_language_scanner.c"
+#line 7109 "Zend/zend_language_scanner.c"
/* *********************************** */
yyc_ST_VAR_OFFSET:
{
@@ -7193,7 +7205,7 @@ yy795:
yy796:
YYDEBUG(796, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1350 "Zend/zend_language_scanner.l"
+#line 1362 "Zend/zend_language_scanner.l"
{ /* Offset could be treated as a long */
if (yyleng < MAX_LENGTH_OF_LONG - 1 || (yyleng == MAX_LENGTH_OF_LONG - 1 && strcmp(yytext, long_min_digits) < 0)) {
zendlval->value.lval = strtol(yytext, NULL, 10);
@@ -7205,7 +7217,7 @@ yy796:
}
return T_NUM_STRING;
}
-#line 7209 "Zend/zend_language_scanner.c"
+#line 7221 "Zend/zend_language_scanner.c"
yy797:
YYDEBUG(797, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7225,23 +7237,23 @@ yy798:
yy799:
YYDEBUG(799, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1660 "Zend/zend_language_scanner.l"
+#line 1672 "Zend/zend_language_scanner.l"
{
/* Only '[' can be valid, but returning other tokens will allow a more explicit parse error */
return yytext[0];
}
-#line 7234 "Zend/zend_language_scanner.c"
+#line 7246 "Zend/zend_language_scanner.c"
yy800:
YYDEBUG(800, *YYCURSOR);
++YYCURSOR;
YYDEBUG(801, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1655 "Zend/zend_language_scanner.l"
+#line 1667 "Zend/zend_language_scanner.l"
{
yy_pop_state(TSRMLS_C);
return ']';
}
-#line 7245 "Zend/zend_language_scanner.c"
+#line 7257 "Zend/zend_language_scanner.c"
yy802:
YYDEBUG(802, *YYCURSOR);
yych = *++YYCURSOR;
@@ -7251,14 +7263,14 @@ yy803:
++YYCURSOR;
YYDEBUG(804, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1665 "Zend/zend_language_scanner.l"
+#line 1677 "Zend/zend_language_scanner.l"
{
/* Invalid rule to return a more explicit parse error with proper line number */
yyless(0);
yy_pop_state(TSRMLS_C);
return T_ENCAPSED_AND_WHITESPACE;
}
-#line 7262 "Zend/zend_language_scanner.c"
+#line 7274 "Zend/zend_language_scanner.c"
yy805:
YYDEBUG(805, *YYCURSOR);
++YYCURSOR;
@@ -7267,19 +7279,19 @@ yy805:
yy806:
YYDEBUG(806, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1672 "Zend/zend_language_scanner.l"
+#line 1684 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, yytext, yyleng);
zendlval->type = IS_STRING;
return T_STRING;
}
-#line 7277 "Zend/zend_language_scanner.c"
+#line 7289 "Zend/zend_language_scanner.c"
yy807:
YYDEBUG(807, *YYCURSOR);
++YYCURSOR;
YYDEBUG(808, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 2190 "Zend/zend_language_scanner.l"
+#line 2202 "Zend/zend_language_scanner.l"
{
if (YYCURSOR > YYLIMIT) {
return 0;
@@ -7288,7 +7300,7 @@ yy807:
zend_error(E_COMPILE_WARNING,"Unexpected character in input: '%c' (ASCII=%d) state=%d", yytext[0], yytext[0], YYSTATE);
goto restart;
}
-#line 7292 "Zend/zend_language_scanner.c"
+#line 7304 "Zend/zend_language_scanner.c"
yy809:
YYDEBUG(809, *YYCURSOR);
++YYCURSOR;
@@ -7324,13 +7336,13 @@ yy811:
yy813:
YYDEBUG(813, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1649 "Zend/zend_language_scanner.l"
+#line 1661 "Zend/zend_language_scanner.l"
{
zend_copy_value(zendlval, (yytext+1), (yyleng-1));
zendlval->type = IS_STRING;
return T_VARIABLE;
}
-#line 7334 "Zend/zend_language_scanner.c"
+#line 7346 "Zend/zend_language_scanner.c"
yy814:
YYDEBUG(814, *YYCURSOR);
++YYCURSOR;
@@ -7362,14 +7374,14 @@ yy818:
yy820:
YYDEBUG(820, *YYCURSOR);
yyleng = YYCURSOR - SCNG(yy_text);
-#line 1362 "Zend/zend_language_scanner.l"
+#line 1374 "Zend/zend_language_scanner.l"
{ /* Offset must be treated as a string */
zendlval->value.str.val = (char *)estrndup(yytext, yyleng);
zendlval->value.str.len = yyleng;
zendlval->type = IS_STRING;
return T_NUM_STRING;
}
-#line 7373 "Zend/zend_language_scanner.c"
+#line 7385 "Zend/zend_language_scanner.c"
yy821:
YYDEBUG(821, *YYCURSOR);
++YYCURSOR;
@@ -7382,6 +7394,6 @@ yy821:
goto yy820;
}
}
-#line 2199 "Zend/zend_language_scanner.l"
+#line 2211 "Zend/zend_language_scanner.l"
}
diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l
index 250d307d5..3be8ed172 100644
--- a/Zend/zend_language_scanner.l
+++ b/Zend/zend_language_scanner.l
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_scanner.l 293154 2010-01-05 20:40:23Z sebastian $ */
+/* $Id: zend_language_scanner.l 300871 2010-06-30 02:45:10Z felipe $ */
#if 0
# define YYDEBUG(s, c) printf("state: %d char: %c\n", s, c)
@@ -139,8 +139,10 @@ static void yy_pop_state(TSRMLS_D)
static void yy_scan_buffer(char *str, unsigned int len TSRMLS_DC)
{
YYCURSOR = (YYCTYPE*)str;
- SCNG(yy_start) = YYCURSOR;
YYLIMIT = YYCURSOR + len;
+ if (!SCNG(yy_start)) {
+ SCNG(yy_start) = YYCURSOR;
+ }
}
void startup_scanner(TSRMLS_D)
@@ -241,7 +243,14 @@ ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC)
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
{
char *file_path = NULL, *buf;
- size_t size;
+ size_t size, offset = 0;
+
+ /* The shebang line was read, get the current position to obtain the buffer start */
+ if (CG(start_lineno) == 2 && file_handle->type == ZEND_HANDLE_FP && file_handle->handle.fp) {
+ if ((offset = ftell(file_handle->handle.fp)) == -1) {
+ offset = 0;
+ }
+ }
if (zend_stream_fixup(file_handle, &buf, &size TSRMLS_CC) == FAILURE) {
return FAILURE;
@@ -257,6 +266,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
/* Reset the scanner for scanning the new file */
SCNG(yy_in) = file_handle;
+ SCNG(yy_start) = NULL;
if (size != -1) {
#ifdef ZEND_MULTIBYTE
@@ -275,9 +285,10 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC)
} else {
SCNG(input_filter)(&SCNG(script_filtered), &SCNG(script_filtered_size), SCNG(script_org), SCNG(script_org_size) TSRMLS_CC);
}
-
+ SCNG(yy_start) = SCNG(script_filtered) - offset;
yy_scan_buffer((char *)SCNG(script_filtered), SCNG(script_filtered_size) TSRMLS_CC);
#else /* !ZEND_MULTIBYTE */
+ SCNG(yy_start) = buf - offset;
yy_scan_buffer(buf, size TSRMLS_CC);
#endif /* ZEND_MULTIBYTE */
} else {
@@ -413,6 +424,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D
memset(str->value.str.val + str->value.str.len, 0, ZEND_MMAP_AHEAD);
SCNG(yy_in)=NULL;
+ SCNG(yy_start) = NULL;
#ifdef ZEND_MULTIBYTE
SCNG(script_org) = (unsigned char *)estrdup(str->value.str.val);
diff --git a/Zend/zend_language_scanner_defs.h b/Zend/zend_language_scanner_defs.h
index b2bce820f..55b23d6cd 100644
--- a/Zend/zend_language_scanner_defs.h
+++ b/Zend/zend_language_scanner_defs.h
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Thu Sep 10 15:34:33 2009 */
+/* Generated by re2c 0.13.5 on Tue Jun 29 08:18:52 2010 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index f43ed7f91..c7f5fbcf2 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_object_handlers.c 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_object_handlers.c 300407 2010-06-12 15:30:21Z felipe $ */
#include "zend.h"
#include "zend_globals.h"
@@ -945,7 +945,7 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
/* Only change the method to the constructor if the constructor isn't called __construct
* we check for __ so we can be binary safe for lowering, we should use ZEND_CONSTRUCTOR_FUNC_NAME
*/
- if (!memcmp(lc_class_name, function_name_strval, function_name_strlen) && memcmp(ce->constructor->common.function_name, "__", sizeof("__") - 1)) {
+ if (!memcmp(lc_class_name, lc_function_name, function_name_strlen) && memcmp(ce->constructor->common.function_name, "__", sizeof("__") - 1)) {
fbc = ce->constructor;
}
efree(lc_class_name);
@@ -953,13 +953,13 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
if (!fbc && zend_hash_find(&ce->function_table, lc_function_name, function_name_strlen+1, (void **) &fbc)==FAILURE) {
efree(lc_function_name);
- if (ce->__call &&
+ if (ce->__callstatic) {
+ return zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen);
+ } else if (ce->__call &&
EG(This) &&
Z_OBJ_HT_P(EG(This))->get_class_entry &&
instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
return zend_get_user_call_function(ce, function_name_strval, function_name_strlen);
- } else if (ce->__callstatic) {
- return zend_get_user_callstatic_function(ce, function_name_strval, function_name_strlen);
} else {
return NULL;
}
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c
index 5aa15551b..da36efca8 100644
--- a/Zend/zend_objects.c
+++ b/Zend/zend_objects.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_objects.c 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_objects.c 299254 2010-05-11 16:09:43Z dmitry $ */
#include "zend.h"
#include "zend_globals.h"
@@ -52,6 +52,7 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl
zend_function *destructor = object ? object->ce->destructor : NULL;
if (destructor) {
+ zval *old_exception;
zval *obj;
zend_object_store_bucket *obj_bucket;
@@ -99,12 +100,25 @@ ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handl
* For example, if an exception was thrown in a function and when the function's
* local variable destruction results in a destructor being called.
*/
- if (EG(exception) && Z_OBJ_HANDLE_P(EG(exception)) == handle) {
- zend_error(E_ERROR, "Attempt to destruct pending exception");
+ old_exception = NULL;
+ if (EG(exception)) {
+ if (Z_OBJ_HANDLE_P(EG(exception)) == handle) {
+ zend_error(E_ERROR, "Attempt to destruct pending exception");
+ } else {
+ old_exception = EG(exception);
+ Z_ADDREF_P(old_exception);
+ }
}
zend_exception_save(TSRMLS_C);
zend_call_method_with_0_params(&obj, object->ce, &destructor, ZEND_DESTRUCTOR_FUNC_NAME, NULL);
zend_exception_restore(TSRMLS_C);
+ if (old_exception) {
+ if (EG(exception)) {
+ zval_ptr_dtor(&old_exception);
+ } else {
+ EG(exception) = old_exception;
+ }
+ }
zval_ptr_dtor(&obj);
}
}
diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c
index f31ba2473..b11217337 100644
--- a/Zend/zend_opcode.c
+++ b/Zend/zend_opcode.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_opcode.c 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_opcode.c 300350 2010-06-10 11:45:51Z dmitry $ */
#include <stdio.h>
@@ -159,7 +159,10 @@ ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC)
/* Note that only run-time accessed data need to be cleaned up, pre-defined data can
not contain objects and thus are not probelmatic */
zend_hash_apply(&(*pce)->function_table, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
- (*pce)->static_members = NULL;
+ if ((*pce)->static_members) {
+ zend_hash_clean((*pce)->static_members);
+ (*pce)->static_members = NULL;
+ }
} else if (CE_STATIC_MEMBERS(*pce)) {
zend_hash_destroy(CE_STATIC_MEMBERS(*pce));
FREE_HASHTABLE(CE_STATIC_MEMBERS(*pce));
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index fa02c75e0..c61bdc884 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_operators.c 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_operators.c 300765 2010-06-26 17:14:33Z felipe $ */
#include <ctype.h>
@@ -30,6 +30,7 @@
#include "zend_multiply.h"
#include "zend_strtod.h"
#include "zend_exceptions.h"
+#include "zend_closures.h"
#define LONG_SIGN_MASK (1L << (8*sizeof(long)-1))
@@ -646,7 +647,14 @@ ZEND_API void convert_to_array(zval *op) /* {{{ */
ALLOC_HASHTABLE(ht);
zend_hash_init(ht, 0, NULL, ZVAL_PTR_DTOR, 0);
- if (Z_OBJ_HT_P(op)->get_properties) {
+ if (Z_OBJCE_P(op) == zend_ce_closure) {
+ convert_scalar_to_array(op, IS_ARRAY TSRMLS_CC);
+ if (Z_TYPE_P(op) == IS_ARRAY) {
+ zend_hash_destroy(ht);
+ FREE_HASHTABLE(ht);
+ return;
+ }
+ } else if (Z_OBJ_HT_P(op)->get_properties) {
HashTable *obj_ht = Z_OBJ_HT_P(op)->get_properties(op TSRMLS_CC);
if (obj_ht) {
zend_hash_copy(ht, obj_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
@@ -965,8 +973,10 @@ ZEND_API int div_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ *
ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
+ long op1_lval;
zendi_convert_to_long(op1, op1_copy, result);
+ op1_lval = Z_LVAL_P(op1);
zendi_convert_to_long(op2, op2_copy, result);
if (Z_LVAL_P(op2) == 0) {
@@ -981,7 +991,7 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ *
return SUCCESS;
}
- ZVAL_LONG(result, Z_LVAL_P(op1) % Z_LVAL_P(op2));
+ ZVAL_LONG(result, op1_lval % Z_LVAL_P(op2));
return SUCCESS;
}
/* }}} */
@@ -989,10 +999,12 @@ ZEND_API int mod_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ *
ZEND_API int boolean_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
+ long op1_lval;
zendi_convert_to_boolean(op1, op1_copy, result);
+ op1_lval = Z_LVAL_P(op1);
zendi_convert_to_boolean(op2, op2_copy, result);
- ZVAL_BOOL(result, Z_LVAL_P(op1) ^ Z_LVAL_P(op2));
+ ZVAL_BOOL(result, op1_lval ^ Z_LVAL_P(op2));
return SUCCESS;
}
/* }}} */
@@ -1038,6 +1050,7 @@ ZEND_API int bitwise_not_function(zval *result, zval *op1 TSRMLS_DC) /* {{{ */
ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
+ long op1_lval;
if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) {
zval *longer, *shorter;
@@ -1066,9 +1079,10 @@ ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /
return SUCCESS;
}
zendi_convert_to_long(op1, op1_copy, result);
+ op1_lval = Z_LVAL_P(op1);
zendi_convert_to_long(op2, op2_copy, result);
- ZVAL_LONG(result, Z_LVAL_P(op1) | Z_LVAL_P(op2));
+ ZVAL_LONG(result, op1_lval | Z_LVAL_P(op2));
return SUCCESS;
}
/* }}} */
@@ -1076,6 +1090,7 @@ ZEND_API int bitwise_or_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /
ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
+ long op1_lval;
if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) {
zval *longer, *shorter;
@@ -1106,9 +1121,10 @@ ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
zendi_convert_to_long(op1, op1_copy, result);
+ op1_lval = Z_LVAL_P(op1);
zendi_convert_to_long(op2, op2_copy, result);
- ZVAL_LONG(result, Z_LVAL_P(op1) & Z_LVAL_P(op2));
+ ZVAL_LONG(result, op1_lval & Z_LVAL_P(op2));
return SUCCESS;
}
/* }}} */
@@ -1116,6 +1132,7 @@ ZEND_API int bitwise_and_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
+ long op1_lval;
if (Z_TYPE_P(op1) == IS_STRING && Z_TYPE_P(op2) == IS_STRING) {
zval *longer, *shorter;
@@ -1145,9 +1162,10 @@ ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
}
zendi_convert_to_long(op1, op1_copy, result);
+ op1_lval = Z_LVAL_P(op1);
zendi_convert_to_long(op2, op2_copy, result);
- ZVAL_LONG(result, Z_LVAL_P(op1) ^ Z_LVAL_P(op2));
+ ZVAL_LONG(result, op1_lval ^ Z_LVAL_P(op2));
return SUCCESS;
}
/* }}} */
@@ -1155,10 +1173,12 @@ ZEND_API int bitwise_xor_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
+ long op1_lval;
zendi_convert_to_long(op1, op1_copy, result);
+ op1_lval = Z_LVAL_P(op1);
zendi_convert_to_long(op2, op2_copy, result);
- ZVAL_LONG(result, Z_LVAL_P(op1) << Z_LVAL_P(op2));
+ ZVAL_LONG(result, op1_lval << Z_LVAL_P(op2));
return SUCCESS;
}
/* }}} */
@@ -1166,10 +1186,12 @@ ZEND_API int shift_left_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /
ZEND_API int shift_right_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
{
zval op1_copy, op2_copy;
+ long op1_lval;
zendi_convert_to_long(op1, op1_copy, result);
+ op1_lval = Z_LVAL_P(op1);
zendi_convert_to_long(op2, op2_copy, result);
- ZVAL_LONG(result, Z_LVAL_P(op1) >> Z_LVAL_P(op2));
+ ZVAL_LONG(result, op1_lval >> Z_LVAL_P(op2));
return SUCCESS;
}
/* }}} */
diff --git a/Zend/zend_stream.c b/Zend/zend_stream.c
index d3548517a..d3c35f22f 100644
--- a/Zend/zend_stream.c
+++ b/Zend/zend_stream.c
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_stream.c 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_stream.c 300225 2010-06-06 12:32:25Z pajoye $ */
#include "zend.h"
@@ -269,7 +269,9 @@ ZEND_API int zend_stream_fixup(zend_file_handle *file_handle, char **buf, size_t
memset(file_handle->handle.stream.mmap.buf + file_handle->handle.stream.mmap.len, 0, ZEND_MMAP_AHEAD);
}
+#if HAVE_MMAP
return_mapped:
+#endif
file_handle->type = ZEND_HANDLE_MAPPED;
file_handle->handle.stream.mmap.pos = 0;
file_handle->handle.stream.mmap.old_handle = file_handle->handle.stream.handle;
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 987351c6e..76f184fbb 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_variables.c 294427 2010-02-03 18:07:25Z pajoye $ */
+/* $Id: zend_variables.c 293400 2010-01-11 10:07:10Z dmitry $ */
#include <stdio.h>
#include "zend.h"
diff --git a/Zend/zend_variables.h b/Zend/zend_variables.h
index b73602e8b..9a7bbee2a 100644
--- a/Zend/zend_variables.h
+++ b/Zend/zend_variables.h
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_variables.h 294427 2010-02-03 18:07:25Z pajoye $ */
+/* $Id: zend_variables.h 293400 2010-01-11 10:07:10Z dmitry $ */
#ifndef ZEND_VARIABLES_H
#define ZEND_VARIABLES_H
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 06040f336..5a5cf34b0 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm_def.h 293155 2010-01-05 20:46:53Z sebastian $ */
+/* $Id: zend_vm_def.h 300990 2010-07-05 09:08:35Z dmitry $ */
/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -2493,6 +2493,12 @@ ZEND_VM_C_LABEL(return_by_value):
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
+ } else if ((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
+ retval_ptr == &EG(uninitialized_zval)) {
+ zval *ret;
+
+ ALLOC_INIT_ZVAL(ret);
+ *EG(return_value_ptr_ptr) = ret;
} else {
*EG(return_value_ptr_ptr) = retval_ptr;
Z_ADDREF_P(retval_ptr);
@@ -2687,9 +2693,16 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
}
- if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
- ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
- }
+ if (OP1_TYPE == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
+ Z_DELREF_PP(varptr_ptr);
+ ALLOC_ZVAL(*varptr_ptr);
+ INIT_ZVAL(**varptr_ptr);
+ Z_SET_REFCOUNT_PP(varptr_ptr, 0);
+ }
+
+ if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
+ }
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
varptr = *varptr_ptr;
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 826ba57d1..76a785c4b 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -18,6 +18,9 @@
+----------------------------------------------------------------------+
*/
+#ifdef ZEND_WIN32
+# pragma warning(once : 4101)
+#endif
static user_opcode_handler_t zend_user_opcode_handlers[256] = {(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL,(user_opcode_handler_t)NULL};
static zend_uchar zend_user_opcodes[256] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255};
@@ -1661,6 +1664,12 @@ return_by_value:
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
+ } else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
+ retval_ptr == &EG(uninitialized_zval)) {
+ zval *ret;
+
+ ALLOC_INIT_ZVAL(ret);
+ *EG(return_value_ptr_ptr) = ret;
} else {
*EG(return_value_ptr_ptr) = retval_ptr;
Z_ADDREF_P(retval_ptr);
@@ -4928,6 +4937,12 @@ return_by_value:
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
+ } else if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
+ retval_ptr == &EG(uninitialized_zval)) {
+ zval *ret;
+
+ ALLOC_INIT_ZVAL(ret);
+ *EG(return_value_ptr_ptr) = ret;
} else {
*EG(return_value_ptr_ptr) = retval_ptr;
Z_ADDREF_P(retval_ptr);
@@ -8164,6 +8179,12 @@ return_by_value:
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
+ } else if ((IS_VAR == IS_CV || IS_VAR == IS_VAR) &&
+ retval_ptr == &EG(uninitialized_zval)) {
+ zval *ret;
+
+ ALLOC_INIT_ZVAL(ret);
+ *EG(return_value_ptr_ptr) = ret;
} else {
*EG(return_value_ptr_ptr) = retval_ptr;
Z_ADDREF_P(retval_ptr);
@@ -8320,9 +8341,16 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
}
- if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
- return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
- }
+ if (IS_VAR == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
+ Z_DELREF_PP(varptr_ptr);
+ ALLOC_ZVAL(*varptr_ptr);
+ INIT_ZVAL(**varptr_ptr);
+ Z_SET_REFCOUNT_PP(varptr_ptr, 0);
+ }
+
+ if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
varptr = *varptr_ptr;
@@ -22024,6 +22052,12 @@ return_by_value:
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
+ } else if ((IS_CV == IS_CV || IS_CV == IS_VAR) &&
+ retval_ptr == &EG(uninitialized_zval)) {
+ zval *ret;
+
+ ALLOC_INIT_ZVAL(ret);
+ *EG(return_value_ptr_ptr) = ret;
} else {
*EG(return_value_ptr_ptr) = retval_ptr;
Z_ADDREF_P(retval_ptr);
@@ -22180,9 +22214,16 @@ static int ZEND_FASTCALL ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
}
- if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
- return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
- }
+ if (IS_CV == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
+ Z_DELREF_PP(varptr_ptr);
+ ALLOC_ZVAL(*varptr_ptr);
+ INIT_ZVAL(**varptr_ptr);
+ Z_SET_REFCOUNT_PP(varptr_ptr, 0);
+ }
+
+ if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
+ return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
+ }
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
varptr = *varptr_ptr;
diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php
index d7dca6e03..0481b3fd0 100644
--- a/Zend/zend_vm_gen.php
+++ b/Zend/zend_vm_gen.php
@@ -16,7 +16,7 @@
| Authors: Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
- $Id: zend_vm_gen.php 293155 2010-01-05 20:46:53Z sebastian $
+ $Id: zend_vm_gen.php 300264 2010-06-07 23:04:30Z felipe $
*/
$header_text = <<< DATA
@@ -1124,6 +1124,9 @@ function gen_vm($def, $skel) {
// Insert header
out($f, $GLOBALS['header_text']);
+
+ // Suppress free_op1 warnings on Windows
+ out($f, "#ifdef ZEND_WIN32\n# pragma warning(once : 4101)\n#endif\n");
// Support for ZEND_USER_OPCODE
out($f, "static user_opcode_handler_t zend_user_opcode_handlers[256] = {");