xref: /PHP-8.4/ext/spl/tests/gh16574.phpt (revision e9283c08)
1--TEST--
2GH-16574 (Incorrect error "undefined method" messages)
3--CREDITS--
4YuanchengJiang
5--FILE--
6<?php
7$i = new ArrayIterator([1,1,1,1,1]);
8$i = new CachingIterator($i, CachingIterator::FULL_CACHE);
9$i->doesnotexist("x");
10?>
11--EXPECTF--
12Fatal error: Uncaught Error: Call to undefined method CachingIterator::doesnotexist() in %s:%d
13Stack trace:
14#0 {main}
15  thrown in %s on line %d
16