xref: /PHP-8.2/Zend/tests/get_resource_id.phpt (revision a0abc26e)
1--TEST--
2get_resource_id() function
3--FILE--
4<?php
5
6$file = fopen(__FILE__, 'r');
7
8// get_resource_id() is equivalent to an integer cast.
9var_dump(get_resource_id($file) === (int) $file);
10
11// Also works with closed resources.
12fclose($file);
13var_dump(get_resource_id($file) === (int) $file);
14
15?>
16--EXPECT--
17bool(true)
18bool(true)
19