is_resource()
to Check if a Variable is a Resourceis_resource()
to Check if a Variable is a ResourceThe is_resource()
function checks if a variable is a resource. This is useful for validating input or ensuring that a variable is a resource before performing operations that depend on resources.