note 126936 added to errorfunc.examples
| From: | delcroixenator at gmail dot com | Date: | Thu, 17 Mar 2022 07:50:35 +0000 |
| Subject: | note 126936 added to errorfunc.examples | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-217735@lists.php.net to get a copy of this message | ||
For the above "distance" function to work properly, you must correct it as follows:
$d = 0.0; // must be moved before the for loop
$d += $c2*$c2 - $c1*$c1; // must be replaced by $d += ($c2 - $c1) ** 2 ;
Another thing: in the "userErrorHandler" function, the variables $vars and $user_errors
are declared but not used.
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.135 (proxied: 208.127.60.43)
----
Manual Page -- https://php.net/manual/en/errorfunc.examples.php
Edit -- https://main.php.net/note/edit/126936
Del: integrated -- https://main.php.net/note/delete/126936/integrated
Del: useless -- https://main.php.net/note/delete/126936/useless
Del: bad code -- https://main.php.net/note/delete/126936/bad+code
Del: spam -- https://main.php.net/note/delete/126936/spam
Del: non-english -- https://main.php.net/note/delete/126936/non-english
Del: in docs -- https://main.php.net/note/delete/126936/in+docs
Del: other reasons-- https://main.php.net/note/delete/126936
Reject -- https://main.php.net/note/reject/126936
Search -- https://main.php.net/manage/user-notes.php