summaryrefslogtreecommitdiff
path: root/Zend/tests/bug28444.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/bug28444.phpt')
-rwxr-xr-xZend/tests/bug28444.phpt74
1 files changed, 0 insertions, 74 deletions
diff --git a/Zend/tests/bug28444.phpt b/Zend/tests/bug28444.phpt
deleted file mode 100755
index f8a5513e0b..0000000000
--- a/Zend/tests/bug28444.phpt
+++ /dev/null
@@ -1,74 +0,0 @@
---TEST--
-Bug #28444 (Cannot access undefined property for object with overloaded property access)
---FILE--
-<?php
-
-class Object
-{
- public $x;
-
- function __construct($x)
- {
- $this->x = $x;
- }
-}
-
-class Overloaded
-{
- public $props = array();
- public $x;
-
- function __construct($x)
- {
- $this->x = new Object($x);
- }
-
- function __get($prop)
- {
- echo __METHOD__ . "($prop)\n";
- return $this->props[$prop];
- }
-
- function __set($prop, $val)
- {
- echo __METHOD__ . "($prop,$val)\n";
- $this->props[$prop] = $val;
- }
-}
-$y = new Overloaded(2);
-var_dump($y->x);
-var_dump($y->x->x);
-var_dump($y->x->x = 3);
-var_dump($y->y = 3);
-var_dump($y->y);
-var_dump($y->z = new Object(4));
-var_dump($y->z->x);
-$t = $y->z;
-var_dump($t->x = 5);
-var_dump($y->z->x = 6);
-
-?>
-===DONE===
---EXPECTF--
-object(Object)#%d (1) {
- ["x"]=>
- int(2)
-}
-int(2)
-int(3)
-Overloaded::__set(y,3)
-int(3)
-Overloaded::__get(y)
-int(3)
-Overloaded::__set(z,Object id #3)
-object(Object)#%d (1) {
- ["x"]=>
- int(4)
-}
-Overloaded::__get(z)
-int(4)
-Overloaded::__get(z)
-int(5)
-Overloaded::__get(z)
-int(6)
-===DONE===