显示下拉菜单

Test of fgets() 本页面仅提供英文版本。

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #1
$input = [
  
'data' => 'first line
                second line
                third line
                fourth line
                fifth line'
,
  
'__count' => 2,
  
'handle' => '$handle',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'third line
'
,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
'data' => 'first line
                second line
                third line
                fourth line
                fifth line'
,
  
'__count' => 1,
  
'handle' => '$handle',
  
'length' => 11,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'second lin',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
'data' => 'first line
                second line
                third line
                fourth line
                fifth line'
,
  
'__count' => 5,
  
'handle' => '$handle',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => false,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]