get_resource_id

PHP 8
get_resource_id - Returns an integer identifier for the given resource
Manual
Code Examples

get_resource_id( resource$resource ): int

This function provides a type-safe way for generating the integer identifier for a resource.

Parameters

resource

The evaluated resource handle.

Return Values

The int identifier for the given resource.

This function is essentially an int cast of resource to make it easier to retrieve the resource ID.

Related Functions

Example of get_resource_id

Show all examples for get_resource_id

PHP Version:


Function get_resource_id:

Variable handling Functions

Most used PHP functions