The is_resource() function is used to detect whether a variable is a scalar.
Scalar variables are those that contain integer, float, string or boolean, while array, object and resource are not scalars.
PHP 4 >= 4.0.5, PHP 5, PHP 7
bool is_resource (mixed $var)
Parameter description:
$var: The variable to be tested.
Returns TRUE if the specified variable is a scalar, FALSE otherwise.
The output is:
3.1416array(3) { [0]=> string(6) "Codercto" [1]=> string(6) "Google" [2]=> string(8) "Facebook"}