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-- array_intersect_ukey(): Basic test. --FILE-- <?php /* * Function is implemented i..

Decoded Output download

--TEST--
array_intersect_ukey(): Basic test.
--FILE--
<?php
/*
* Function is implemented in ext/standard/array.c
*/
function key_compare_func($key1, $key2) {
    if ($key1 == $key2) return 0;
    else if ($key1 > $key2) return 1;
    else return -1;
}
$array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
var_dump(array_intersect_ukey($array1, $array2, 'key_compare_func'));
?>
--EXPECT--
array(2) {
  ["blue"]=>
  int(1)
  ["green"]=>
  int(3)
}

Did this file decode correctly?

Original Code

--TEST--
array_intersect_ukey(): Basic test.
--FILE--
<?php
/*
* Function is implemented in ext/standard/array.c
*/
function key_compare_func($key1, $key2) {
    if ($key1 == $key2) return 0;
    else if ($key1 > $key2) return 1;
    else return -1;
}
$array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4);
$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);
var_dump(array_intersect_ukey($array1, $array2, 'key_compare_func'));
?>
--EXPECT--
array(2) {
  ["blue"]=>
  int(1)
  ["green"]=>
  int(3)
}

Function Calls

array_intersect_ukey 1

Variables

$array1 [{'key': 'blue', 'value': 1}, {'key': 'red', 'value': 2}, {'key': 'green', 'value': 3}, {'key': 'purple', 'value': 4}]
$array2 [{'key': 'green', 'value': 5}, {'key': 'blue', 'value': 6}, {'key': 'yellow', 'value': 7}, {'key': 'cyan', 'value': 8}]

Stats

MD5 c02c16cc684a91b9ce4a97887e7a4699
Eval Count 0
Decode Time 100 ms