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_unique() function : usage variations - binary safe checking --FILE-- <..

Decoded Output download

--TEST--
Test array_unique() function : usage variations - binary safe checking
--FILE--
<?php
/*
 * Testing the functionality of array_unique() by passing an array having binary values.
*/

echo "*** Testing array_unique() : array with binary data for \$input argument ***
";

// array with binary values
$input = array( b"1", b"hello", "world", "str1" => "hello", "str2" => "world");

var_dump( array_unique($input) );

echo "Done";
?>
--EXPECT--
*** Testing array_unique() : array with binary data for $input argument ***
array(3) {
  [0]=>
  string(1) "1"
  [1]=>
  string(5) "hello"
  [2]=>
  string(5) "world"
}
Done

Did this file decode correctly?

Original Code

--TEST--
Test array_unique() function : usage variations - binary safe checking
--FILE--
<?php
/*
 * Testing the functionality of array_unique() by passing an array having binary values.
*/

echo "*** Testing array_unique() : array with binary data for \$input argument ***\n";

// array with binary values
$input = array( b"1", b"hello", "world", "str1" => "hello", "str2" => "world");

var_dump( array_unique($input) );

echo "Done";
?>
--EXPECT--
*** Testing array_unique() : array with binary data for $input argument ***
array(3) {
  [0]=>
  string(1) "1"
  [1]=>
  string(5) "hello"
  [2]=>
  string(5) "world"
}
Done

Function Calls

None

Variables

None

Stats

MD5 dba29b6593bab515ae378b99885adbce
Eval Count 0
Decode Time 94 ms