Display the drop-down list

Test of preg_split()

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #1
$input = [
  
=> '_SINGLE_QUOTE_/[\\s,]+/_SINGLE_QUOTE_',
  
=> 'hypertext language, programming',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 'hypertext',
      
=> 'language',
      
=> 'programming',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> '//',
  
=> 'string',
  
=> -1,
  
=> 'PREG_SPLIT_NO_EMPTY',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 's',
      
=> 't',
      
=> 'r',
      
=> 'i',
      
=> 'n',
      
=> 'g',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> '/ /',
  
=> 'hypertext language programming',
  
=> -1,
  
=> 'PREG_SPLIT_OFFSET_CAPTURE',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> [
        
=> 'hypertext',
        
=> 0,
      ],
      
=> [
        
=> 'language',
        
=> 10,
      ],
      
=> [
        
=> 'programming',
        
=> 19,
      ],
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]