note 119731 added to errorfunc.constants
| From: | kezzyhko at NOSPAM dot semysha dot ru | Date: | Sat, 13 Aug 2016 18:58:36 +0000 |
| Subject: | note 119731 added to errorfunc.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-206274@lists.php.net to get a copy of this message | ||
As for me, the best way to get error name by int value is that. And it's works fine for me ;)
<?php
array_flip(array_slice(get_defined_constants(true)['Core'], 1, 15, true))[$type];
//the same in readable form
array_flip(
array_slice(
get_defined_constants(true)['Core'],
1,
15,
true
)
)[$type]
?>
----
Server IP: 72.52.91.14
Probable Submitter: 185.150.154.218
----
Manual Page -- http://php.net/manual/en/errorfunc.constants.php
Edit -- https://master.php.net/note/edit/119731
Del: integrated -- https://master.php.net/note/delete/119731/integrated
Del: useless -- https://master.php.net/note/delete/119731/useless
Del: bad code -- https://master.php.net/note/delete/119731/bad+code
Del: spam -- https://master.php.net/note/delete/119731/spam
Del: non-english -- https://master.php.net/note/delete/119731/non-english
Del: in docs -- https://master.php.net/note/delete/119731/in+docs
Del: other reasons-- https://master.php.net/note/delete/119731
Reject -- https://master.php.net/note/reject/119731
Search -- https://master.php.net/manage/user-notes.php