1--TEST--
2WeakReference object handlers
3--FILE--
4<?php
5$wr = WeakReference::create(new stdClass);
6
7var_dump($wr->disallow);
8var_dump(isset($wr->disallow));
9unset($wr->disallow);
10
11try {
12    $wr->disallow = "writes";
13} catch (Error $ex) {
14    var_dump($ex->getMessage());
15}
16
17try {
18    $disallow = &$wr->disallowed;
19} catch (Error $ex) {
20    var_dump($ex->getMessage());
21}
22?>
23--EXPECTF--
24Warning: Undefined property: WeakReference::$disallow in %s on line %d
25NULL
26bool(false)
27string(55) "Cannot create dynamic property WeakReference::$disallow"
28string(57) "Cannot create dynamic property WeakReference::$disallowed"
29