---
id: bc32aee3-3e3c-42e8-b56e-8e8e7f3a8d39
title: get~resourceid~()
---

# Description

Returns a resource id as an integer. See PR[^1]

# Syntax

``` php
$resourceId = get_resource_id($resource);
```

# Footnotes

[^1]: <https://github.com/php/php-src/pull/5427>