1--TEST--
2$this not in object context
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--SKIPIF--
8<?php require_once('skipif.inc'); ?>
9--FILE--
10<?php
11class Foo {
12    private function getConst() {
13        return 42;
14    }
15    public function test() {
16        var_dump($this->getConst());
17    }
18}
19
20Foo::test();
21?>
22--EXPECTF--
23Fatal error: Uncaught Error: Non-static method Foo::test() cannot be called statically in %s:%d
24Stack trace:
25#0 {main}
26  thrown in %s on line %d
27