PHP | stream_is_local() Function
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 program to illustrate // stream_is_local function $res = stream_is_local($strm); // Print result var_dump($res); ?> |
bool(false)
Program 2: Program to print the length of array return by the function.
<?php // PHP program to illustrate // stream_is_local function $stream1 = '/geeks.jpg'; // local // 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); ?> |
bool(true) bool(false) bool(false)
Reference: http://php.net/manual/en/function.stream-is-local.php
Recommended Posts:
- How to call a function that return another function in JavaScript ?
- How to get the function name from within that function using JavaScript ?
- D3.js | d3.max() function
- p5.js | hex() function
- PHP | pi( ) Function
- p5.js | str() function
- PHP | Ds\Map map() Function
- p5.js | arc() Function
- PHP | each() Function
- p5.js | nf() Function
- p5.js | box() Function
- PHP | Ds\Map last() Function
- PHP | pow( ) Function
- PHP | Ds\Map first() Function
- PHP Ds\Map sum() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



