-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathexamples.xml
More file actions
40 lines (40 loc) · 1.61 KB
/
examples.xml
File metadata and controls
40 lines (40 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: bce2cb849721c70737eb32ce958131e22677770c Maintainer: mumumu Status: ready -->
<appendix xml:id="examples" xmlns="http://docbook.org/ns/docbook">
<title>マニュアルのサンプルコードについて</title>
<simpara>
PHP のドキュメント中にあるたくさんのサンプルコードは、
コードの明瞭さや簡潔さを優先したため、
エラーや例外処理を省略している点に注意すべきです。
</simpara>
<simpara>
これは、本番コードでエラー処理を省略すべきだという意味ではありません。
エラー処理を省略すると、<exceptionname>TypeError</exceptionname>
がスローされたり、&false; のような失敗を表す値が空文字列に強制変換されたり、
仮定が破られることで追跡困難なバグが発生する可能性があるためです。
拡張モジュールによっては、
それが提供する様々なメソッドや関数の完全な使い方を示すために、
エラー処理を含む完全な例を提供している場合もあります。
</simpara>
</appendix>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->