summaryrefslogtreecommitdiff
path: root/tests/lang
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2016-11-22 11:23:17 +0300
committerDmitry Stogov <dmitry@zend.com>2016-11-22 11:23:17 +0300
commit68ee168c756d10380fb643cd8098c8307e4017f5 (patch)
tree2cce508c4f73479bc845886fa2844767fd44edf0 /tests/lang
parentf6e3241a733aef7d103f411eb037d9fb2f3ae699 (diff)
parentdb5bbe94be59b09096252aeea77126d0d85ad663 (diff)
downloadphp-git-68ee168c756d10380fb643cd8098c8307e4017f5.tar.gz
Merge branch 'PHP-7.1'
* PHP-7.1: Fixed memory leak (Bob)
Diffstat (limited to 'tests/lang')
-rw-r--r--tests/lang/operators/overloaded_property_ref.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/lang/operators/overloaded_property_ref.phpt b/tests/lang/operators/overloaded_property_ref.phpt
new file mode 100644
index 0000000000..7561fc9916
--- /dev/null
+++ b/tests/lang/operators/overloaded_property_ref.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Operators on overlaoded property reference
+--FILE--
+<?php
+class C {
+ function __construct() { $this->bar = str_repeat("1", 2); }
+ function &__get($x) { return $this->bar; }
+ function __set($x, $v) { $this->bar = $v; }
+}
+$x = new C;
+var_dump(++$x->foo);
+$x = new C;
+var_dump($x->foo++);
+$x = new C;
+var_dump($x->foo += 2);
+?>
+--EXPECT--
+int(12)
+string(2) "11"
+int(13)