mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
19 lines
328 B
Plaintext
19 lines
328 B
Plaintext
|
--TEST--
|
||
|
get_resource_id() function
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
$file = fopen(__FILE__, 'r');
|
||
|
|
||
|
// get_resource_id() is equivalent to an integer cast.
|
||
|
var_dump(get_resource_id($file) === (int) $file);
|
||
|
|
||
|
// Also works with closed resources.
|
||
|
fclose($file);
|
||
|
var_dump(get_resource_id($file) === (int) $file);
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
bool(true)
|
||
|
bool(true)
|