File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
tests /
classes /
static_this.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
1: --TEST--
2: ZE2 $this can be an argument to a static function
3: --FILE--
4: <?php
5:
6: class TestClass
7: {
8: function __construct()
9: {
10: self::Test1();
11: $this->Test1();
12: }
13:
14: static function Test1()
15: {
16: var_dump($this);
17: }
18:
19: static function Test2($this)
20: {
21: var_dump($this);
22: }
23: }
24:
25: $obj = new TestClass;
26: TestClass::Test2(new stdClass);
27:
28: ?>
29: ===DONE===
30: --EXPECTF--
31:
32: Notice: Undefined variable: this in %sstatic_this.php on line %d
33: NULL
34:
35: Notice: Undefined variable: this in %sstatic_this.php on line %d
36: NULL
37: object(stdClass)#%d (0) {
38: }
39: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>