显示下拉菜单

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

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 #9 : test success
Example #10 : test success
Example #11 : test success
Example #12 : test success
Example #13 : test success
Example #14 : test success
Example #15 : test success
Example #16 : test failed
Example #17 : test failed
Example #18 : test success
Example #19 : test failed
Example #1
$input = [
  
=> 'abcdef',
  
=> -1,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'f',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> 'abcdef',
  
=> -2,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'ef',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> 'abcdef',
  
=> -3,
  
=> 1,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'd',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #4
$input = [
  
=> 'abcdef',
  
=> 0,
  
=> -1,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'abcde',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #5
$input = [
  
=> 'abcdef',
  
=> 2,
  
=> -1,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'cde',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #6
$input = [
  
=> 'abcdef',
  
=> 4,
  
=> -4,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => false,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #7
$input = [
  
=> 'abcdef',
  
=> -3,
  
=> -1,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'de',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #8
$input = [
  
=> 'abcdef',
  
=> 1,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'bcdef',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #9
$input = [
  
=> 'abcdef',
  
=> 1,
  
=> 3,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'bcd',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #10
$input = [
  
=> 'abcdef',
  
=> 0,
  
=> 4,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'abcd',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #11
$input = [
  
=> 'abcdef',
  
=> 0,
  
=> 8,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'abcdef',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #12
$input = [
  
=> 'abcdef',
  
=> -1,
  
=> 1,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'f',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #13
$input = [
  
=> 'pear',
  
=> 0,
  
=> 2,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'pe',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #14
$input = [
  
=> 54321,
  
=> 0,
  
=> 2,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => '54',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #15
$input = [
  
=> true,
  
=> 0,
  
=> 1,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => '1',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #16
$input = [
  
=> false,
  
=> 0,
  
=> 1,
]
$expected_output = [
  
'result' => [
    
'string' => false,
  ],
  
'php_version' => '5.6.8 WINNT i586',
]
$test_output = [
  
'result' => [
    
'string' => '',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #17
$input = [
  
=> '',
  
=> 0,
  
=> 1,
]
$expected_output = [
  
'result' => [
    
'string' => false,
  ],
  
'php_version' => '5.6.8 WINNT i586',
]
$test_output = [
  
'result' => [
    
'string' => '',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #18
$input = [
  
=> 1200.0,
  
=> 0,
  
=> 4,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => '1200',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #19
$input = [
  
=> 'a',
  
=> 1,
]
$expected_output = [
  
'result' => [
    
'string' => false,
  ],
  
'php_version' => '5.6.8 WINNT i586',
]
$test_output = [
  
'result' => [
    
'string' => '',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]