Display the drop-down list

Test of natsort()

Example #1 : test success
Example #2 : test success
Example #3 : test failed
Example #4 : test success
Example #5 : test failed
Example #1
$input = [
  
'__array' => [
    
=> 'img12.png',
    
=> 'img10.png',
    
=> 'img2.png',
    
=> 'img1.png',
  ],
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 'img1.png',
      
=> 'img2.png',
      
=> 'img10.png',
      
=> 'img12.png',
    ],
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
'__array' => [
    
=> '-5',
    
=> '3',
    
=> '-2',
    
=> '0',
    
=> '-1000',
    
=> '9',
    
=> '1',
  ],
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> '-2',
      
=> '-5',
      
=> '-1000',
      
=> '0',
      
=> '1',
      
=> '3',
      
=> '9',
    ],
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
'__array' => [
    
=> '09',
    
=> '8',
    
=> '10',
    
=> '009',
    
=> '011',
    
=> '0',
  ],
  
=> '$array',
]
$expected_output = [
  
'result' => [
    
'array' => [
      
=> '0',
      
=> '8',
      
=> '009',
      
=> '09',
      
=> '10',
      
=> '011',
    ],
    
'bool' => true,
  ],
  
'php_version' => '5.6.8 WINNT i586',
]
$test_output = [
  
'result' => [
    
'array' => [
      
=> '0',
      
=> '8',
      
=> '09',
      
=> '009',
      
=> '10',
      
=> '011',
    ],
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #4
$input = [
  
'__array' => [
    
=> 'image_1.jpg',
    
=> 'image_12.jpg',
    
=> 'image_21.jpg',
    
=> 'image_4.jpg',
  ],
  
=> '$array',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'array' => [
      
=> 'image_1.jpg',
      
=> 'image_4.jpg',
      
=> 'image_12.jpg',
      
=> 'image_21.jpg',
    ],
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #5
$input = [
  
'__array' => [
    
'orange' => 1,
    
'apple' => 1,
    
'yogurt' => 4,
    
'banana' => 4,
  ],
  
=> '$array',
]
$expected_output = [
  
'result' => [
    
'array' => [
      
'orange' => 1,
      
'apple' => 1,
      
'banana' => 4,
      
'yogurt' => 4,
    ],
    
'bool' => true,
  ],
  
'php_version' => '5.6.8 WINNT i586',
]
$test_output = [
  
'result' => [
    
'array' => [
      
'orange' => 1,
      
'apple' => 1,
      
'yogurt' => 4,
      
'banana' => 4,
    ],
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]