--TEST-- Phar: test edge cases of file_get_contents() function interception --SKIPIF-- --INI-- phar.readonly=0 --FILE-- getMessage(), "\n"; } chdir(__DIR__); file_put_contents($fname, "blah\n"); file_put_contents("fgc_edgecases.txt", "test\n"); echo file_get_contents($fname); unlink($fname); mkdir($pname . '/oops'); file_put_contents($pname . '/foo/hi', ' '); include $pname . '/foo/hi'; ?> --CLEAN-- --EXPECTF-- file_get_contents(): Argument #1 ($filename) must be a valid path, array given blah Warning: file_get_contents(): Length must be greater than or equal to zero in phar://%sfgc_edgecases.phar.php/foo/hi on line %d test test Warning: file_get_contents(phar://%sfgc_edgecases.phar.php/oops): Failed to open stream: phar error: path "oops" is a directory in phar://%sfgc_edgecases.phar.php/foo/hi on line %d Warning: file_get_contents(): Failed to seek to position 50000 in the stream in phar://%sfgc_edgecases.phar.php/foo/hi on line %d