iterator_to_array冻结,例如 获得致命错误:超过30秒的最大执行时间

i get

Fatal error: Maximum execution time of 30 seconds exceeded in ../src/kint/parsers/custom/objectiterateable.php on line 10

the problematic line does this:

$arrayCopy = iterator_to_array( $variable, true );

some lines around it:

if ( !KINT_PHP53 || !is_object( $variable ) || !$variable instanceof Traversable ) return false;


    $arrayCopy = iterator_to_array( $variable, true );

    if ( $arrayCopy === false ) return false;

    $this->value = kintParser::factory( $arrayCopy )->extendedValue;
    $this->type  = 'Iterator contents';
    $this->size  = count( $arrayCopy );

is there something to make the iterator_to_array more secure? e.g. just return nothing in some cases?

use set_time_limit(0) in your page