1--TEST-- 2SPL: RegexIterator::getPregFlags() 3--CREDITS-- 4Lance Kesson jac_kesson@hotmail.com 5#testfest London 2009-05-09 6--FILE-- 7<?php 8 9class myIterator implements Iterator { 10 11function current (): mixed { return null; } 12function key ( ): mixed { return ""; } 13function next ( ): void {} 14function rewind ( ): void {} 15function valid ( ): bool {} 16 17 18} 19 20class TestRegexIterator extends RegexIterator{} 21 22$rege = '/^a/'; 23 24 25$r = new TestRegexIterator(new myIterator, $rege); 26 27$r->setPregFlags(PREG_OFFSET_CAPTURE); 28 29echo is_long($r->getPregFlags()); 30 31?> 32--EXPECT-- 331 34