????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 18.190.154.145
Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f
System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/home/b8009/php-5.6.22/ext/standard/tests/array/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/home/b8009/php-5.6.22/ext/standard/tests/array/natcasesort_variation3.phpt
--TEST--
Test natcasesort() function : usage variations - different numeric types
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
?>
--FILE--
<?php
/* Prototype  : bool natcasesort(array &$array_arg)
 * Description: Sort an array using case-insensitive natural sort
 * Source code: ext/standard/array.c
 */

/*
 * Pass arrays of numeric data to test how natcasesort re-orders the array
 */

echo "*** Testing natcasesort() : usage variation ***\n";

$inputs = array (

  // negative/positive integers array
  array(11, -11, 21, -21, 31, -31, 0, 41, -41),

  // float value array
  array(10.5, -10.5, 10.5e2, 10.6E-2, .5, .01, -.1),

  // mixed value array
  array(.0001, .0021, -.01, -1, 0, .09, 2, -.9, 10.6E-2, -10.6E-2, 33),
 
  // array values contains minimum and maximum ranges
  array(2147483647, 2147483648, -2147483647, -2147483648, -0, 0, -2147483649)
);

$iterator = 1;
foreach ($inputs as $array_arg) {
	echo "\n-- Iteration $iterator --\n";
	var_dump(natcasesort($array_arg));
	var_dump($array_arg);
}

echo "Done";
?>

--EXPECTF--
*** Testing natcasesort() : usage variation ***

-- Iteration 1 --
bool(true)
array(9) {
  [1]=>
  int(-11)
  [3]=>
  int(-21)
  [5]=>
  int(-31)
  [8]=>
  int(-41)
  [6]=>
  int(0)
  [0]=>
  int(11)
  [2]=>
  int(21)
  [4]=>
  int(31)
  [7]=>
  int(41)
}

-- Iteration 1 --
bool(true)
array(7) {
  [6]=>
  float(-0.1)
  [1]=>
  float(-10.5)
  [5]=>
  float(0.01)
  [4]=>
  float(0.5)
  [3]=>
  float(0.106)
  [0]=>
  float(10.5)
  [2]=>
  float(1050)
}

-- Iteration 1 --
bool(true)
array(11) {
  [2]=>
  float(-0.01)
  [7]=>
  float(-0.9)
  [9]=>
  float(-0.106)
  [3]=>
  int(-1)
  [4]=>
  int(0)
  [0]=>
  float(0.0001)
  [1]=>
  float(0.0021)
  [5]=>
  float(0.09)
  [8]=>
  float(0.106)
  [6]=>
  int(2)
  [10]=>
  int(33)
}

-- Iteration 1 --
bool(true)
array(7) {
  [2]=>
  int(-2147483647)
  [3]=>
  float(-2147483648)
  [6]=>
  float(-2147483649)
  [5]=>
  int(0)
  [4]=>
  int(0)
  [0]=>
  int(2147483647)
  [1]=>
  float(2147483648)
}
Done

Youez - 2016 - github.com/yon3zu
LinuXploit