summaryrefslogtreecommitdiff
path: root/Zend/tests/dereference_014.phpt
blob: 62dffd36980da06c2c8ad0ee54eabfad2582286a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--TEST--
Trying to create an object from dereferencing uninitialized variable
--FILE--
<?php

error_reporting(E_ALL);

class foo {
	public $x;
	static public $y;
		
	public function a() {
		return $this->x;
	}
	
	static public function b() {
		return self::$y;
	}
}

$foo = new foo;
$h = $foo->a()[0]->a;
var_dump($h);

$h = foo::b()[1]->b;
var_dump($h);

?>
--EXPECTF--
Notice: Trying to get property of non-object in %s on line %d
NULL

Notice: Trying to get property of non-object in %s on line %d
NULL