xref: /PHP-8.4/ext/opcache/tests/bug73402.phpt (revision e9f783fc)
1--TEST--
2Bug #73402 (Opcache segfault when using class constant to call a method)
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6--EXTENSIONS--
7opcache
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