note 20210 deleted from internals2.ze1.zendapi by cmb
| From: | cmb@php.net | Date: | Sun, 10 Jan 2021 13:25:26 +0000 |
| Subject: | note 20210 deleted from internals2.ze1.zendapi by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-216113@lists.php.net to get a copy of this message | ||
Note Submitter: john dot gallet at wanadoo dot fr
----
Concerning all add_*_stringl() functions :
they do not behave like snprintf() for instance, i.e. the length of the string is not a *maximum
length* but an *exact* length, and you end up with null '\000' or '\@'
caracters in your PHP string if the length parameter is greater than the actual length of the string
to be associated with return_value.
Yes, it is clearly written but still a trick if you are used to strncpy() or snprintf().
HTH