Function __global->looks_like_url
Definitions
sources/urls.php
- Find if a value appears to be some kind of URL (possibly a Comcode one).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $value | string | No | No | required parameter | N/A | N/A | The value to check |
| $lax | boolean | No | No | False | N/A | N/A | Whether to be a bit lax in the check |
Returns
- Whether the value appears to be a URL
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find if a value appears to be some kind of URL (possibly a Comcode one).
*
* @param string $value The value to check
* @param boolean $lax Whether to be a bit lax in the check
* @return boolean Whether the value appears to be a URL
*/
function looks_like_url(string $value, bool $lax = false) : bool
* Find if a value appears to be some kind of URL (possibly a Comcode one).
*
* @param string $value The value to check
* @param boolean $lax Whether to be a bit lax in the check
* @return boolean Whether the value appears to be a URL
*/
function looks_like_url(string $value, bool $lax = false) : bool

