Display the drop-down list

Test of explode()

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #1
$input = [
  
=> ' ',
  
=> 'piece1 piece2 piece3 piece4 piece5 piece6',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 'piece1',
      
=> 'piece2',
      
=> 'piece3',
      
=> 'piece4',
      
=> 'piece5',
      
=> 'piece6',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> ':',
  
=> 'foo:*:1023:1000::/home/foo:/bin/sh',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 'foo',
      
=> '*',
      
=> '1023',
      
=> '1000',
      
=> '',
      
=> '/home/foo',
      
=> '/bin/sh',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> '|',
  
=> 'one|two|three|four',
  
=> 2,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 'one',
      
=> 'two|three|four',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]