summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/bug80805.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/opcache/tests/bug80805.phpt')
-rw-r--r--ext/opcache/tests/bug80805.phpt26
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/opcache/tests/bug80805.phpt b/ext/opcache/tests/bug80805.phpt
new file mode 100644
index 0000000000..65e4748e57
--- /dev/null
+++ b/ext/opcache/tests/bug80805.phpt
@@ -0,0 +1,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)