PHP | stream_is_local() Function Last Updated : 17 Dec, 2018 Comments Improve Suggest changes Like Article Like Report The stream_is_local() function is an inbuilt function in PHP which is used to check if a stream is a local stream or URL. Syntax: bool stream_is_local( $stream ) Parameters: This function accepts single parameter $stream, which is used to specify the stream to be check. Return Value: This function returns True on success or False on failure. Below programs illustrate the stream_is_local() function in PHP: Program 1: PHP <?php // PHP program to illustrate // stream_is_local function $strm = "https://www.geeksforgeeks.org"; $res = stream_is_local($strm); // Print result var_dump($res); ?> Output: bool(false) Program 2: Program to print the length of array return by the function. php <?php // PHP program to illustrate // stream_is_local function $stream1 = '/geeks.jpg'; // local $stream2 = 'file://geeks.jpg'; // local $stream3 = 'http://geeksforgeeks.org'; // non local stream // Checking all strings and print result $local = stream_is_local($stream1); var_dump($local); $shouldbelocal = stream_is_local($stream2); var_dump($shouldbelocal); $remote = stream_is_local($stream3); var_dump($remote); ?> Output: bool(true) bool(false) bool(false) Reference: http://php.net/manual/en/function.stream-is-local.php Comment More infoAdvertise with us Next Article PHP | stream_is_local() Function R R_Raj Follow Improve Article Tags : Web Technologies PHP PHP-array PHP-function Similar Reads PHP | is_readable( ) Function The is_readable() function in PHP used to check whether the specified file exists and is readable or not. The name of the file is sent as a parameter to the is_readable() function and it returns True if the file exists and is readable. is_readable() function returns False for streams, for example, p 2 min read PHP | stream_get_meta_data() Function The stream_get_meta_data() function is an inbuilt function in PHP which is used to get the header or meta data from the streams/file pointers.Syntax: array stream_get_meta_data( $stream ) Parameters: The function accepts single parameter $stream, which specifies the meta data to be retrieve and whic 2 min read PHP | localtime() Function The localtime() function is an inbuilt function in PHP which is used to return the local time. The array returned by the localtime() function is similar to the structure returned by the C function call. The $timestamp and $is_associative are sent as parameters to the localtime() function and it retu 2 min read PHP | XMLReader isValid() Function The XMLReader::isValid() function is an inbuilt function in PHP which is used to check if the document being parsed is valid or not. An XML is valid if it is written by following a DTD (Document Type Definition) which defines all the allowed elements and the structure of elements. Syntax: bool XMLRe 2 min read PHP | is_link( ) Function The is_link() function in PHP used to check whether the specified file is a symbolic link or not. The path to the file is sent as a parameter to the is_link() function and it returns TRUE if the filename exists and is a symbolic link, otherwise it returns FALSE. Syntax: is_link(file) Parameters Used 2 min read Like