Display the drop-down list

Test of call_user_func_array()

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #4 : test success
Example #5 : test success
Example #6 : test success
Example #7 : test success
Example #8 : test success
Example #1
$input = [
  
=> 'foobar',
  
=> [
    
=> 'one',
    
=> 'two',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => 'foobar got one and two',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> '$barber',
  
=> [
    
=> 'mushroom',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => 'You wanted a mushroom haircut, no problem',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> [
    
=> 'myclass',
    
=> 'say_hello',
  ],
  
=> [
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => 'Hello!',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #4
$input = [
  
=> 'myclass::say_hello',
  
=> [
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => 'Hello!',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #5
$input = [
  
=> [
    
=> '$object',
    
=> 'say_goodbye',
  ],
  
=> [
    
=> 'Bob',
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => 'Goodbye Bob!',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #6
$input = [
  
=> 'strncmp',
  
=> [
    
=> 'abc',
    
=> 'DEF',
    
=> 3,
  ],
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => 1,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #7
$input = [
  
=> 'foobar',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => NULL,
  ],
  
'errors' => [
    
=> [
      
'code' => 2,
      
'message' => 'call_user_func_array() expects exactly 2 parameters, 1 given',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #8
$input = [
  
=> 'foobar',
  
=> 123,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'mixed' => NULL,
  ],
  
'errors' => [
    
=> [
      
'code' => 2,
      
'message' => 'call_user_func_array() expects parameter 2 to be array, integer given',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]