xref: /PHP-8.0/ext/opcache/tests/bug73402.phpt (revision 7aacc705)
1--TEST--
2Bug #73402 (Opcache segfault when using class constant to call a method)
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6--SKIPIF--
7<?php require_once('skipif.inc'); ?>
8--FILE--
9<?php
10class Logger {
11    public function info($msg) {
12        echo $msg;
13    }
14}
15
16class B
17{
18    const LOG_LEVEL = 'Info';
19    public function test()
20    {
21        $logger = new \Logger();
22        $logger->{self::LOG_LEVEL}('test');
23    }
24}
25
26$b = new B;
27$b->test();
28?>
29--EXPECT--
30test
31