Display the drop-down list

Test of file_get_contents()

Example #1 : 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 not validated (platform dependant or random result etc.)
Example #10 : test success
Example #1
$input = [
  
=> 'tempname',
  
=> NULL,
  
=> NULL,
  
=> 6,
  
=> 5,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'world',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
=> 'tempname',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'Hello world !',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #4
$input = [
  
=> 'tempname',
  
=> true,
  
=> 'xyz',
  
=> 6,
  
=> 5,
]
$expected_output = $test_output
$test_output = [
  
'errors' => [
    
=> [
      
'code' => 512,
      
'message' => 'this argument value is not allowed ($use_include_path)',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #5
$input = [
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => NULL,
  ],
  
'errors' => [
    
=> [
      
'code' => 2,
      
'message' => 'file_get_contents() expects at least 1 parameter, 0 given',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #6
$input = [
  
=> 'tempname',
  
=> NULL,
  
=> NULL,
  
=> '_NO_CHANGE_',
  
=> 5,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'Hello world !',
  ],
  
'errors' => [
    
=> [
      
'code' => 1024,
      
'message' => 'the following argument has been removed ($maxlen)',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #7
$input = [
  
=> 'tempname',
  
=> NULL,
  
=> '_NO_CHANGE_',
  
=> 6,
  
=> 5,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'Hello world !',
  ],
  
'errors' => [
    
=> [
      
'code' => 1024,
      
'message' => 'the following arguments have been removed ($offset, $maxlen)',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #8
$input = [
  
=> 'http://www.example.com/',
  
=> false,
  
=> NULL,
  
=> 0,
  
=> 99999,
]
$expected_output = $test_output
$test_output = [
  
'errors' => [
    
=> [
      
'code' => 512,
      
'message' => 'the length must be defined and lower than 10000 bytes ($maxlen)',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #9
$input = [
  
=> 'abc',
]
test not validated (platform dependant or random result etc.)
$test_output = [
  
'errors' => [
    
=> [
      
'code' => 512,
      
'message' => 'the filename must start with one of the following strings (/tmp/pbe, http://, https://)',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #10
$input = [
  
=> 'tempname',
  
=> true,
  
=> NULL,
  
=> 6,
  
=> 5,
]
$expected_output = $test_output
$test_output = [
  
'errors' => [
    
=> [
      
'code' => 512,
      
'message' => 'this argument value is not allowed ($use_include_path)',
    ],
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]