reference/var/functions/get-resource-type.xml
d816a0fad6c458d9515f697cc89e26ca9d8069f5
d816a0fad6c458d9515f697cc89e26ca9d8069f5
...
...
@@ -13,7 +13,7 @@
13
13
&reftitle.description;
14
14
<methodsynopsis>
15
15
<type>string</type><methodname>get_resource_type</methodname>
16
-
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
16
+
<methodparam><type>resource</type><parameter>resource</parameter></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
This function gets the type of the given resource.
...
...
@@ -25,7 +25,7 @@
25
25
<para>
26
26
<variablelist>
27
27
<varlistentry>
28
-
<term><parameter>handle</parameter></term>
28
+
<term><parameter>resource</parameter></term>
29
29
<listitem>
30
30
<para>
31
31
The evaluated resource handle.
...
...
@@ -39,14 +39,14 @@
39
39
<refsect1 role="returnvalues">
40
40
&reftitle.returnvalues;
41
41
<para>
42
-
If the given <parameter>handle</parameter> is a resource, this function
42
+
If the given <parameter>resource</parameter> is a resource, this function
43
43
will return a string representing its type. If the type is not identified
44
44
by this function, the return value will be the string
45
45
<literal>Unknown</literal>.
46
46
</para>
47
47
<para>
48
-
This function will return &false; and generate an error if
49
-
<parameter>handle</parameter> is not a <type>resource</type>.
48
+
This function will return &null; and generate an error if
49
+
<parameter>resource</parameter> is not a <type>resource</type>.
50
50
</para>
51
51
</refsect1>
52
52
...
...
@@ -58,25 +58,30 @@
58
58
<programlisting role="php">
59
59
<![CDATA[
60
60
<?php
61
-
// prints: mysql link
62
-
$c = mysql_connect();
63
-
echo get_resource_type($c) . "\n";
64
-
65
-
// prints: stream
66
61
$fp = fopen("foo", "w");
67
62
echo get_resource_type($fp) . "\n";
68
-
69
-
// prints: domxml document
70
-
$doc = new_xmldoc("1.0");
71
-
echo get_resource_type($doc->doc) . "\n";
72
63
?>
73
64
]]>
74
65
</programlisting>
66
+
&example.outputs.7;
67
+
<screen role="php">
68
+
<![CDATA[
69
+
stream
70
+
]]>
71
+
</screen>
75
72
</example>
76
73
</para>
77
74
</refsect1>
78
-
</refentry>
79
75
76
+
<refsect1 role="seealso">
77
+
&reftitle.seealso;
78
+
<para>
79
+
<simplelist>
80
+
<member><function>get_resource_id</function></member>
81
+
</simplelist>
82
+
</para>
83
+
</refsect1>
84
+
</refentry>
80
85
<!-- Keep this comment at the end of the file
81
86
Local variables:
82
87
mode: sgml
83
88