1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00
Files
archived-doc-en/appendices/examples.xml
Gina Peter Banyard bce2cb8497 Audit review (#4797)
* Add an appendix for example code in manual

* dio: Fix issue 8 of audit

* intl: Fix issue 67 of audit

* intl: Fix issue 60 & 61 of audit

* intl: Fix issue 55, 56, 57, 58 & 65 of audit

And make example useful

* enchant: Fix issue 41 of audit

Remove calls to deprecated functions

* enchant: Fix issue 38 of audit

Incorrect variable

* enchant: Fix issue 35 of audit

Remove calls to deprecated functions

* enchant: Fix issue 34 of audit

Incorrect variable

* Fix dio_read return check

* Fix issue 1 and 2

---------

Co-authored-by: Jakub Zelenka <bukka@php.net>
2025-08-12 23:00:40 +02:00

38 lines
1.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<appendix xml:id="examples" xmlns="http://docbook.org/ns/docbook">
<title>About manual examples</title>
<simpara>
It should be noted that many examples in the PHP documentation omit error
and exception handling for clarity and brevity.
</simpara>
<simpara>
This does not mean that error handling should be omitted for production code
as it can lead to <exceptionname>TypeError</exceptionname>s being thrown,
failure values being coerces, such as &false; into an empty string,
or assumptions being violated which might cause difficult to track bugs.
Some extensions provide complete examples where error handling is included
to demonstrate correct usage of the various functions and methods provided
by the extension.
</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
-->