Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- SPL: iterator_to_array() without keys --FILE-- <?php $it = new AppendIterator();..

Decoded Output download

--TEST--
SPL: iterator_to_array() without keys
--FILE--
<?php

$it = new AppendIterator();
$it->append(new ArrayIterator(array(1,2)));
$it->append(new ArrayIterator(array(2,3)));

var_dump(iterator_to_array($it));
var_dump(iterator_to_array($it, false));
var_dump(iterator_to_array($it, true));

?>
--EXPECT--
array(2) {
  [0]=>
  int(2)
  [1]=>
  int(3)
}
array(4) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(2)
  [3]=>
  int(3)
}
array(2) {
  [0]=>
  int(2)
  [1]=>
  int(3)
}

Did this file decode correctly?

Original Code

--TEST--
SPL: iterator_to_array() without keys
--FILE--
<?php

$it = new AppendIterator();
$it->append(new ArrayIterator(array(1,2)));
$it->append(new ArrayIterator(array(2,3)));

var_dump(iterator_to_array($it));
var_dump(iterator_to_array($it, false));
var_dump(iterator_to_array($it, true));

?>
--EXPECT--
array(2) {
  [0]=>
  int(2)
  [1]=>
  int(3)
}
array(4) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  int(2)
  [3]=>
  int(3)
}
array(2) {
  [0]=>
  int(2)
  [1]=>
  int(3)
}

Function Calls

None

Variables

None

Stats

MD5 234a66f03656067b1c302f72b6de0c22
Eval Count 0
Decode Time 110 ms