com doc/ja: Update example: reference/var/functions/get-resource-type.xml
| From: | Yoshinari Takaoka | Date: | Thu, 18 Feb 2021 08:51:27 +0000 |
| Subject: | com doc/ja: Update example: reference/var/functions/get-resource-type.xml | ||
| Groups: | php.doc.ja | ||
| Request: | Send a blank email to doc-ja+get-6195@lists.php.net to get a copy of this message | ||
Commit: dd1b901cf2bc3c9bd6273cbc93b350ba6de40bee
Author: Yoshinari Takaoka <mumumu@mumumu.org> Thu, 18 Feb 2021 17:51:27 +0900
Parents: e1be4921305b4b5de4ad269b4c3391738d3179e1
Branches: master
Link: http://git.php.net/?p=doc/ja.git;a=commitdiff;h=dd1b901cf2bc3c9bd6273cbc93b350ba6de40bee
Log:
Update example
mysql_connect() and new_xmldoc() are deprecated/removed.
Closes GH-454.
Changed paths:
M reference/var/functions/get-resource-type.xml
Diff:
diff --git a/reference/var/functions/get-resource-type.xml
b/reference/var/functions/get-resource-type.xml
index 85ce7b20f5..e0872e7f9c 100644
--- a/reference/var/functions/get-resource-type.xml
+++ b/reference/var/functions/get-resource-type.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- splitted from ./ja/functions/var.xml, last change in rev 1.23 -->
-<!-- EN-Revision: ac20506c2ac1e8af83fd3577d1387c6cb648a5e6 Maintainer: hirokawa Status: ready
-->
+<!-- EN-Revision: e4c3d5d495373a8ae080e9e8b62ffe512f2dfd11 Maintainer: hirokawa Status: ready
-->
<!-- CREDITS: takagi,mumumu -->
<refentry xml:id="function.get-resource-type" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -57,17 +57,13 @@
<programlisting role="php">
<![CDATA[
<?php
-// mysql link を出力
-$c = mysql_connect();
-echo get_resource_type($c) . "\n";
-
// stream を出力
$fp = fopen("foo", "w");
echo get_resource_type($fp) . "\n";
-// domxml document を出力
-$doc = new_xmldoc("1.0");
-echo get_resource_type($doc->doc) . "\n";
+// curl を出力
+$c = curl_init ();
+echo get_resource_type($c) . "\n"; // PHP 8.0.0
より前のバージョンで動作します。8.0 以降は CurlHandle
オブジェクトを返すからです。
?>
]]>
</programlisting>