diff options
author | Dmitry Stogov <dmitry@zend.com> | 2016-11-22 11:22:55 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2016-11-22 11:22:55 +0300 |
commit | db5bbe94be59b09096252aeea77126d0d85ad663 (patch) | |
tree | f72140cf82cdfd4d67834734c65a886a6911eb9f /tests | |
parent | b10de2f5c2c4a8585960419e04d5c21fe0908c2a (diff) | |
parent | 63ea4d194bab4401a7de3f1706d156d64cf137f3 (diff) | |
download | php-git-db5bbe94be59b09096252aeea77126d0d85ad663.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fixed memory leak (Bob)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lang/operators/overloaded_property_ref.phpt | 20 |
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) |