summaryrefslogtreecommitdiff
path: root/Zend/tests/get_resource_id.phpt
blob: 70b3995d46c3ed230e3f17a2ab318b661eeb8074 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--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)