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: ArrayIterator with NULL key --FILE-- <?php $ar = new ArrayIterator(array( ..

Decoded Output download

--TEST--
SPL: ArrayIterator with NULL key
--FILE--
<?php

$ar = new ArrayIterator(array(
    NULL=>1,
    ""=>2,
    ""=>3,
    ""=>4,
    "*"=>5,
    "*"=>6,
    ));
@var_dump($ar);
var_dump($ar->getArrayCopy());

?>
--EXPECTF--
object(ArrayIterator)#%d (1) {
  ["storage":"ArrayIterator":private]=>
  array(6) {
    [""]=>
    int(1)
    ["%0"]=>
    int(2)
    ["%0%0"]=>
    int(3)
    ["%0%0%0"]=>
    int(4)
    ["%0*"]=>
    int(5)
    ["%0*%0"]=>
    int(6)
  }
}
array(6) {
  [""]=>
  int(1)
  ["%0"]=>
  int(2)
  ["%0%0"]=>
  int(3)
  ["%0%0%0"]=>
  int(4)
  ["%0*"]=>
  int(5)
  ["%0*%0"]=>
  int(6)
}

Did this file decode correctly?

Original Code

--TEST--
SPL: ArrayIterator with NULL key
--FILE--
<?php

$ar = new ArrayIterator(array(
    NULL=>1,
    "\0"=>2,
    "\0\0"=>3,
    "\0\0\0"=>4,
    "\0*"=>5,
    "\0*\0"=>6,
    ));
@var_dump($ar);
var_dump($ar->getArrayCopy());

?>
--EXPECTF--
object(ArrayIterator)#%d (1) {
  ["storage":"ArrayIterator":private]=>
  array(6) {
    [""]=>
    int(1)
    ["%0"]=>
    int(2)
    ["%0%0"]=>
    int(3)
    ["%0%0%0"]=>
    int(4)
    ["%0*"]=>
    int(5)
    ["%0*%0"]=>
    int(6)
  }
}
array(6) {
  [""]=>
  int(1)
  ["%0"]=>
  int(2)
  ["%0%0"]=>
  int(3)
  ["%0%0%0"]=>
  int(4)
  ["%0*"]=>
  int(5)
  ["%0*%0"]=>
  int(6)
}

Function Calls

None

Variables

None

Stats

MD5 6ab76718792525435bae9a77f70dd030
Eval Count 0
Decode Time 84 ms