note 129472 added to function.base64-encode
| From: | cyru@55.one | Date: | Wed, 08 May 2024 11:23:58 +0000 |
| Subject: | note 129472 added to function.base64-encode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221317@lists.php.net to get a copy of this message | ||
correct function description is:
base64_encode(string $string): string|null
in PHP 5.x and 7.x this function may return non-string result, just make a WARNING
<?php
var_dump(@base64_encode( Array() ));
?>
that may need to strval() or is_null()
although in PHP 8.0+ FATAL error will end it
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.131 (proxied: 209.250.234.93)
----
Manual Page -- https://php.net/manual/en/function.base64-encode.php
Edit -- https://main.php.net/note/edit/129472
Del: integrated -- https://main.php.net/note/delete/129472/integrated
Del: useless -- https://main.php.net/note/delete/129472/useless
Del: bad code -- https://main.php.net/note/delete/129472/bad+code
Del: spam -- https://main.php.net/note/delete/129472/spam
Del: non-english -- https://main.php.net/note/delete/129472/non-english
Del: in docs -- https://main.php.net/note/delete/129472/in+docs
Del: other reasons-- https://main.php.net/note/delete/129472
Reject -- https://main.php.net/note/reject/129472
Search -- https://main.php.net/manage/user-notes.php