summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/bug80805.phpt
blob: 65e4748e5710649926c6b2a3094727beeebb95fe (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
--TEST--
Bug #80805: create simple class and get error in opcache.so
--FILE--
<?php

class Test {
    public int $foo;
    public function __construct()
    {
        $this->foo = 2;
    }
    public function inc(): int
    {
        return $this->foo += 2;
    }
}

$test = new Test();
var_dump($test->foo);
$test->inc();
var_dump($test->foo);

?>
--EXPECT--
int(2)
int(4)