functions-online

General

Execute and test PHP functions that have no place in one of the other categories.

filter_var

Filters a variable with a specified filter.

floatval

Gets the float value of $var.

Geo Distance

The distance function calculates the distance between 2 geo-coordinates. The distance is the distance on the crow flies, not by an itinerary.

The coordinates can be entered with . and , for the decimal place. Calculates the distance in kilometers (km).

intval

Returns the integer value of $var, using the specified $base for the conversion (the default is base 10).

json_decode

Json_decode() takes a JSON encoded string and converts it into a PHP variable.

json_encode

Returns a string containing the JSON representation of $value.

serialize

Generates a storable representation of a value. This is useful for storing or passing PHP values around without losing their type and structure.

To make the serialized string into a PHP value again, use unserialize().

strval

Returns the string value of $var. $var may be any scalar type. You cannot use strval() on arrays or objects.

unserialize

unserialize() takes a single serialized variable and converts it back into a PHP value.