summaryrefslogtreecommitdiff
path: root/Zend/tests/self_in_eval.phpt
blob: efd81ad266956e4e386ce1bfc67f6954670c6afb (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
--TEST--
self etc. can be used in eval() in a class scope
--FILE--
<?php

class C {
    const FOO = 1;
    private static $bar = 2;
    public static function f() {
        eval(<<<'PHP'
var_dump(self::FOO);
var_dump(self::$bar);
var_dump(self::class);
var_dump(static::class);
PHP
        );
    }
}

C::f();

?>
--EXPECT--
int(1)
int(2)
string(1) "C"
string(1) "C"