xref: /PHP-7.4/ext/opcache/tests/bug80805.phpt (revision e8579365)
1--TEST--
2Bug #80805: create simple class and get error in opcache.so
3--FILE--
4<?php
5
6class Test {
7    public int $foo;
8    public function __construct()
9    {
10        $this->foo = 2;
11    }
12    public function inc(): int
13    {
14        return $this->foo += 2;
15    }
16}
17
18$test = new Test();
19var_dump($test->foo);
20$test->inc();
21var_dump($test->foo);
22
23?>
24--EXPECT--
25int(2)
26int(4)
27