1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-24 07:42:10 +01:00

73 Commits

Author SHA1 Message Date
Mikhail Alferov
21ce7d7f4f set-error-handler.xml Remove the misleading statement
For the method of the class as an error handler, the `set_error_handler` function may return a `callable`:

a) a string

b) a Closure

c) an indexed array (with the name of the class or an instance of the class in the first element, and the name of the method in the second one)

However, it is not limited to just "an indexed array with the class and method name".

I suggest removing the mention of the array as a return value, otherwise we will have to list every possible type of callable value :)
2025-04-24 16:08:57 +02:00
Arnaud Le Blanc
4a6671fe69 Document get_error_handler(), get_exception_handler() (#4567)
RFC: https://wiki.php.net/rfc/get-error-exception-handler
2025-04-21 13:15:50 +02:00
Kamil Tekiela
23906aa9f6 die is not a function (#2218) 2023-01-19 10:01:59 +00:00
Robert Morley
bd38d9d20a Reword excessively hardcore requirement
While we're at it, we also remove the personalization.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-2123.
2022-12-31 14:18:55 +01:00
David Grudl
14a60fad6e Fixed info about @ operator (#1196)
- UPGRADING says that the error_reporting (ie. value returned by error_reporting() or ini_get('error_reporting ')) is changed, not the severity value passed to the handler.
- UPGRADING says that the error_reporting() == 0 should be replaced with !(error_reporting() & $err_no) in code, not the return with return false. So there is currenctly no way how to detect @ operator.
- "Prior to PHP 8.0.0, the value of the severity passed to the custom error handler was always 0" - no true
- "return false; // Silenced" - not true, if the function returns false then the normal error handler continues, so it is not "silenced".

(partially reverts "Cleanup and update docs related to @ operator" commit 12b1d4704ea448b55ec155619be1e50c0e67e9f9.)

Co-authored-by: George Peter Banyard <girgias@php.net>
Co-authored-by: Larry Garfield <larry@garfieldtech.com>
2022-04-04 20:28:18 +01:00
Máté Kocsis
769812c12f Generate various ext/standard method synopses from stubs - part 5 (#1232) 2021-12-22 12:34:12 +01:00
Christoph M. Becker
44090248a8 Update set_error|exeception_handler $callback descriptions
First, the $callback is a callable, and users are supposed to either
know what that means, or look it up elsewhere in the documentation, so
there is no need to explain it here again, and let it rot again.

Second, there is no need anymore to document pre PHP 7.0.0 behavior.
2021-12-17 14:22:42 +01:00
Christoph M. Becker
7a312f9c79 set_error_handler() no longer returns null on failure
As of PHP 8.0.0, it throws a TypeError; prior to that version, that was
undefined behavior (as documented for internal functions).
2021-11-18 15:23:04 +01:00
Máté
c44475e1fa Generate methodsynopses based on stubs for Zend functions and methods
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-168.
2021-05-22 16:48:16 +02:00
George Peter Banyard
12b1d4704e Cleanup and update docs related to @ operator
Also fix part of the set_error_handler() docs

Closes GH-441
2021-02-18 16:31:56 +00:00
Christoph Michael Becker
71c12b1583 set_error_handler: clarify callback parameters and PHP 8.0 changes
Closes GH-276.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@352038 c90b9560-bf6c-de11-be94-00142212c4b1
2020-12-12 18:36:18 +00:00
Christoph Michael Becker
80872147aa Get rid of "callback" types
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350788 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-06 09:11:05 +00:00
Christoph Michael Becker
9af43469f4 Remove more changelog entries, mostly from PHP 5.2 era
Patch contributed by Sobak <msobaczewski@gmail.com>.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350654 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-26 13:52:31 +00:00
Christoph Michael Becker
f29b00cccf Improve example regarding valid HTML
This integrated user note 125348.  Also, there is no need to `break` after `exit`ing.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350547 c90b9560-bf6c-de11-be94-00142212c4b1
2020-09-11 12:39:38 +00:00
Peter Cowburn
0007fca77f Clarify set_error_handler types that cannot be handled (doc bug #76318)
Patch by Sorin Nunca

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@349133 c90b9560-bf6c-de11-be94-00142212c4b1
2020-02-05 20:04:00 +00:00
Andrey Andreev
028513e94b Document PHP 7.2 deprecations as the result of https://wiki.php.net/rfc/deprecations_php_7_2
Also, simplify the first paragraph of 'Traditional assertions' in assert() docs

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342126 c90b9560-bf6c-de11-be94-00142212c4b1
2017-03-14 11:30:59 +00:00
Thomas Punt
0e2239fcf9 Resolve doc bug #73892
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@341674 c90b9560-bf6c-de11-be94-00142212c4b1
2017-01-17 10:39:08 +00:00
Maciej Sobaczewski
e41aab5eca Remove changelogs for PHP 4 - 3rd round
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@334621 c90b9560-bf6c-de11-be94-00142212c4b1
2014-08-27 17:46:13 +00:00
Maciej Sobaczewski
afc3f34c68 Remove changelogs for PHP 4 - 1st round
Useful changelogs entries remain untouched.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@334592 c90b9560-bf6c-de11-be94-00142212c4b1
2014-08-23 17:55:23 +00:00
Yoshinari Takaoka
7619879383 - just fixed typo. :)
-- https://bugs.php.net/bug.php?id=65302


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330998 c90b9560-bf6c-de11-be94-00142212c4b1
2013-07-21 15:49:53 +00:00
Jakub Vrana
1d285503e2 Document set_error_handler(null)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330243 c90b9560-bf6c-de11-be94-00142212c4b1
2013-05-16 18:34:12 +00:00
Jakub Vrana
f68abbe82c Document callback signatures
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@330240 c90b9560-bf6c-de11-be94-00142212c4b1
2013-05-16 18:24:33 +00:00
Jakub Vrana
84b8fca68f Use <function> for language constructs (now supported by PhD)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@325214 c90b9560-bf6c-de11-be94-00142212c4b1
2012-04-15 21:45:34 +00:00
Jakub Vrana
a9b26c34e4 Display language constructs without parentheses
Side effect of this change is that include, require and return are now properly linked. They weren't because they don't live inside <refentry> so PhD doesn't know about them.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@324522 c90b9560-bf6c-de11-be94-00142212c4b1
2012-03-25 08:39:30 +00:00
Jakub Vrana
5faa7a6747 Document and use callable type hint introduced in PHP 5.4
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@324122 c90b9560-bf6c-de11-be94-00142212c4b1
2012-03-12 05:55:59 +00:00
Daniel Egeberg
3e2947ca55 Improved example in set_error_handler(). Fixes PHP bug #52338.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@301531 c90b9560-bf6c-de11-be94-00142212c4b1
2010-07-25 11:20:19 +00:00
Daniel Egeberg
96c9d88bad Converted to utf-8
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297028 c90b9560-bf6c-de11-be94-00142212c4b1
2010-03-28 22:10:10 +00:00
Daniel Egeberg
fb3676153f Fixed doc bug #50849 (set_error_handler claims it makes error_reporting() settings have no effec)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@294084 c90b9560-bf6c-de11-be94-00142212c4b1
2010-01-27 12:26:37 +00:00
Torben Wilson
af4410a7e1 Normalized the sgml-default-dtd-file local-variable line for those
still using this, after discussion on the phpdoc list.
From now on, manual.ced will need to be found at ~/.phpdoc/manual.ced.



git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@288721 c90b9560-bf6c-de11-be94-00142212c4b1
2009-09-25 07:04:39 +00:00
Nilgün Belma Bugüner
605fe4df23 fixed properties
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@283808 c90b9560-bf6c-de11-be94-00142212c4b1
2009-07-11 06:57:16 +00:00
Jakub Vrana
5730e7a2fa Initializers - part 5
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@273648 c90b9560-bf6c-de11-be94-00142212c4b1
2009-01-16 16:14:26 +00:00
Hannes Magnusson
2557e888bb Add seealso ErrorException
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@269061 c90b9560-bf6c-de11-be94-00142212c4b1
2008-11-15 18:22:07 +00:00
Simion Onea
b0ce16a36f Added a semicolon after &null
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@268104 c90b9560-bf6c-de11-be94-00142212c4b1
2008-11-01 07:57:50 +00:00
Kalle Sommer Nielsen
bc81b2bc29 Fixed #45628 (set_error_handler() return type wrongly documented)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@268101 c90b9560-bf6c-de11-be94-00142212c4b1
2008-11-01 06:11:19 +00:00
Hannes Magnusson
5cd5661448 Use proper markup for variables
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@265362 c90b9560-bf6c-de11-be94-00142212c4b1
2008-08-23 15:40:25 +00:00
Jakub Vrana
8e063d6a8d Returning false from callback (bug #41680)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@241384 c90b9560-bf6c-de11-be94-00142212c4b1
2007-08-17 02:28:56 +00:00
Hannes Magnusson
c030e2adf7 Upgrade to DocBook5:
- All id attributes are now xml:id
 - Add docbook namespace to all root elements
 - Replace <ulink /> with <link xlink:href />
 - Minor markup fixes here and there


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
2007-06-20 22:25:43 +00:00
Mehdi Achour
022241dd1a Clean up files (ws, missing roles, layout)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@229000 c90b9560-bf6c-de11-be94-00142212c4b1
2007-02-04 22:49:08 +00:00
Hannes Magnusson
17ebd5b70a Fix example and add some whitespace to make it readable
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@227237 c90b9560-bf6c-de11-be94-00142212c4b1
2007-01-14 19:43:52 +00:00
Hannes Magnusson
b402661349 Fixed bug#40057 (merge 5.2.0 $php_errormsg changes into documentation)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@226736 c90b9560-bf6c-de11-be94-00142212c4b1
2007-01-08 10:31:05 +00:00
Dave Barr
c8e821cf05 - Fix example output + typo (bricebhb)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@211993 c90b9560-bf6c-de11-be94-00142212c4b1
2006-04-26 01:10:20 +00:00
Jakub Vrana
f6dc3a0443 User error handler must not modify error context (bug #35459)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@201582 c90b9560-bf6c-de11-be94-00142212c4b1
2005-11-29 13:25:45 +00:00
Jakub Vrana
9eb72ca307 Returns NULL in case of an error (bug #35100)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@199960 c90b9560-bf6c-de11-be94-00142212c4b1
2005-11-04 14:12:16 +00:00
Philip Olson
a0fb692b2c ref.errorfunc: Implemented the new doc style, and rewording where appropriate.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@185011 c90b9560-bf6c-de11-be94-00142212c4b1
2005-04-24 23:19:35 +00:00
Philip Olson
267173c6c0 WS, preparation for the new doc style
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@184982 c90b9560-bf6c-de11-be94-00142212c4b1
2005-04-24 15:36:00 +00:00
Gabor Hojtsy
5f343aab92 get rid of confusing shortcuts
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@183650 c90b9560-bf6c-de11-be94-00142212c4b1
2005-04-05 11:26:15 +00:00
Jakub Vrana
363d447203 errno is parameter
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@183555 c90b9560-bf6c-de11-be94-00142212c4b1
2005-04-04 09:28:20 +00:00
Jakub Vrana
85e5332941 Most of E_STRICT are raised at the compile time (bug #31919)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@179747 c90b9560-bf6c-de11-be94-00142212c4b1
2005-02-14 09:02:44 +00:00
Horst Schirmeier
21d3994f71 callback type "see also" added
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@177745 c90b9560-bf6c-de11-be94-00142212c4b1
2005-01-20 12:44:05 +00:00
Yannick Torres
597c9e6b87 use more entities
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@171848 c90b9560-bf6c-de11-be94-00142212c4b1
2004-11-01 16:40:58 +00:00