1--TEST--
2Attempting to access static properties using instance property syntax
3--FILE--
4<?php
5class C {
6    public static $x = 'C::$x';
7    protected static $y = 'C::$y';
8}
9
10$c = new C;
11
12echo "\n--> Access visible static prop like instance prop:\n";
13var_dump(isset($c->x));
14unset($c->x);
15echo $c->x;
16$c->x = 1;
17$ref = 'ref';
18$c->x =& $ref;
19var_dump($c->x, C::$x);
20
21echo "\n--> Access non-visible static prop like instance prop:\n";
22var_dump(isset($c->y));
23//unset($c->y);		// Fatal error, tested in static_properties_003_error1.phpt
24//echo $c->y;		// Fatal error, tested in static_properties_003_error2.phpt
25//$c->y = 1;		// Fatal error, tested in static_properties_003_error3.phpt
26//$c->y =& $ref;	// Fatal error, tested in static_properties_003_error4.phpt
27?>
28==Done==
29--EXPECTF--
30--> Access visible static prop like instance prop:
31bool(false)
32
33Notice: Accessing static property C::$x as non static in %s on line 11
34
35Notice: Accessing static property C::$x as non static in %s on line 12
36
37Notice: Undefined property: C::$x in %s on line 12
38
39Notice: Accessing static property C::$x as non static in %s on line 13
40
41Notice: Accessing static property C::$x as non static in %s on line 15
42
43Notice: Accessing static property C::$x as non static in %s on line 16
44string(3) "ref"
45string(5) "C::$x"
46
47--> Access non-visible static prop like instance prop:
48bool(false)
49==Done==
50