xref: /PHP-8.1/Zend/tests/bug54305.phpt (revision fbe30592)
1--TEST--
2Bug #54305 (Crash in gc_remove_zval_from_buffer)
3--FILE--
4<?php
5class TestClass {
6    public function methodWithArgs($a, $b) {
7    }
8}
9abstract class AbstractClass {
10}
11$methodWithArgs = new ReflectionMethod('TestClass', 'methodWithArgs');
12try {
13    echo $methodWithArgs++;
14} catch (TypeError $e) {
15    echo $e->getMessage(), "\n";
16}
17?>
18--EXPECT--
19Cannot increment ReflectionMethod
20