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

Decoded Output download

--TEST--
array_diff_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_diff_ukey($array1, $array2, 'key_compare_func'));
?>
--EXPECT--
array(2) {
  ["red"]=>
  int(2)
  ["purple"]=>
  int(4)
}

Did this file decode correctly?

Original Code

--TEST--
array_diff_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_diff_ukey($array1, $array2, 'key_compare_func'));
?>
--EXPECT--
array(2) {
  ["red"]=>
  int(2)
  ["purple"]=>
  int(4)
}

Function Calls

array_diff_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 c7ef6cc2603989236dcd2251059ab8c4
Eval Count 0
Decode Time 153 ms