1--TEST--
2Cannot write to closure properties
3--FILE--
4<?php
5
6class A {
7    function getFn() {
8        return function() {
9        };
10    }
11}
12
13$a = new A;
14try {
15    $c = $a->getFn()->b = new stdClass;
16} catch (Error $e) {
17    echo $e->getMessage(), "\n";
18}
19
20?>
21--EXPECT--
22Cannot create dynamic property Closure::$b
23