1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 22:41:20 +02:00
Files
archived-php-src/ext/opcache/tests/bug80805.phpt
Nikita Popov e857936518 Fixed bug #80805
Handle missing result_var in binary_op_result_type.

(cherry picked from commit 8446e28275)
2021-03-01 15:13:15 +01:00

27 lines
374 B
PHP

--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)