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 natcasesort() function : usage variations - different hex values --FILE-- <?..
Decoded Output download
*** Testing natcasesort() : usage variation ***
Did this file decode correctly?
Original Code
--TEST--
Test natcasesort() function : usage variations - different hex values
--FILE--
<?php
/*
* Pass an array of different hex values to test how natcasesort() re-orders it
*/
echo "*** Testing natcasesort() : usage variation ***\n";
$unsorted_hex_array = array(0x1AB, 0xFFF, 0xF, 0xFF, 0x2AA, 0xBB, 0x1ab, 0xff, -0xFF, 0, -0x2aa);
var_dump( natcasesort($unsorted_hex_array) );
var_dump($unsorted_hex_array);
echo "Done";
?>
--EXPECT--
*** Testing natcasesort() : usage variation ***
bool(true)
array(11) {
[8]=>
int(-255)
[10]=>
int(-682)
[9]=>
int(0)
[2]=>
int(15)
[5]=>
int(187)
[3]=>
int(255)
[7]=>
int(255)
[0]=>
int(427)
[6]=>
int(427)
[4]=>
int(682)
[1]=>
int(4095)
}
Done
Function Calls
natcasesort | 1 |
Stats
MD5 | a56032451740ded602fb768ed6ab7162 |
Eval Count | 0 |
Decode Time | 84 ms |