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-- Test array_key_exists() function : usage variations - referenced variables --FILE..

Decoded Output download

*** Testing array_key_exists() : usage variations ***

-- \$search is a reference to \$array --

Did this file decode correctly?

Original Code

--TEST--
Test array_key_exists() function : usage variations - referenced variables
--FILE--
<?php
/*
 * Pass referenced variables as arguments to array_key_exists() to test behaviour
 */

echo "*** Testing array_key_exists() : usage variations ***\n";

$array = array('one' => 1, 'two' => 2, 'three' => 3);

echo "\n-- \$search is a reference to \$array --\n";
$search = &$array;
var_dump(array_key_exists('one', $search));

echo "Done";
?>
--EXPECT--
*** Testing array_key_exists() : usage variations ***

-- $search is a reference to $array --
bool(true)
Done

Function Calls

array_key_exists 1

Variables

$array [{'key': 'one', 'value': 1}, {'key': 'two', 'value': 2}, {'key': 'three', 'value': 3}]
$search [{'key': 'one', 'value': 1}, {'key': 'two', 'value': 2}, {'key': 'three', 'value': 3}]

Stats

MD5 c202bb4bf9fbace62245f47a6e7210e7
Eval Count 0
Decode Time 88 ms