Wie kann man in PHP den genauen Typ einer Resource-Variable ermitteln?

To determine the exact type of a resource variable in PHP, you can use the `get_resource_type()` function. This function returns the resource type as a string, which can help you identify the specific type of resource you are working with.

$resource = fopen('example.txt', 'r');
$resourceType = get_resource_type($resource);
echo $resourceType; // This will output "stream"