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-- XHP idx Expression 03 --FILE-- <?php $array = array(); $array[0] = 'zero'; $array..

Decoded Output download

--TEST--
XHP idx Expression 03
--FILE--
<?php
$array = array();
$array[0] = 'zero';
$array['key'] = 'value';

@var_dump(__xhp_idx($array, 0));
@var_dump(__xhp_idx($array, '0'));
@var_dump(__xhp_idx($array, NULL));
@var_dump(__xhp_idx($array, true));
@var_dump(__xhp_idx($array, false));
@var_dump(__xhp_idx($array, 'key'));
@var_dump(__xhp_idx($array, 'other_key'));
--EXPECT--
string(4) "zero"
string(4) "zero"
NULL
NULL
string(4) "zero"
string(5) "value"
NULL
 ?>

Did this file decode correctly?

Original Code

--TEST--
XHP idx Expression 03
--FILE--
<?php
$array = array();
$array[0] = 'zero';
$array['key'] = 'value';

@var_dump(__xhp_idx($array, 0));
@var_dump(__xhp_idx($array, '0'));
@var_dump(__xhp_idx($array, NULL));
@var_dump(__xhp_idx($array, true));
@var_dump(__xhp_idx($array, false));
@var_dump(__xhp_idx($array, 'key'));
@var_dump(__xhp_idx($array, 'other_key'));
--EXPECT--
string(4) "zero"
string(4) "zero"
NULL
NULL
string(4) "zero"
string(5) "value"
NULL

Function Calls

None

Variables

None

Stats

MD5 4c8869e45ed207f35f1fea621e249f7f
Eval Count 0
Decode Time 86 ms