← All docs

get_resource_id()

Returns an integer identifier for the given resource.

get_resource_id()

function get_resource_id(resource $resource): int

Returns an integer identifier for the given resource.

Parameters:

  • $resource (resource)

Returns: int

Availability

No examples yet — check examples/ and showcases/ for usage patterns.

Internals

For how get_resource_id is implemented in the compiler, see the internals page.