Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / php / ext / spl / tests / spl_iterator_apply_error_001.phpt
blob54663c0da889dd6b18b435538217b02377958e03
1 --TEST--
2 SPL: Error: iterator_apply when the callback throws an exception
3 --FILE--
4 <?php
6 function test() {
7         throw new Exception('Broken callback');
10 $it = new RecursiveArrayIterator(array(1, 21, 22));
12 try {
13         iterator_apply($it, 'test');
14 } catch (Exception $e) {
15         echo $e->getMessage();
19 --EXPECT--
20 Broken callback