Doc #80397 [NEW]: The documentation on this page is ambiguous about example language
| From: | jacob at jacobthompson dot com | Date: | Sat, 21 Nov 2020 20:03:54 +0000 |
| Subject: | Doc #80397 [NEW]: The documentation on this page is ambiguous about example language | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-18143@lists.php.net to get a copy of this message | ||
From: jacob at jacobthompson dot com
Operating system: N/A
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:The documentation on this page is ambiguous about example language
Description:
------------
The script example here
(https://www.php.net/manual/en/internals2.memory.management.php) fails
to mention how to try the example by setting up your own extension with
ext_skel.php and adding the function provided in this example. It is
also ambiguous about whether the example code is in PHP or c. An
experienced developer could probably figure this out with the pointer
dereferencing going on, but it would be helpful if the guide was more
clear on what language is being used in the examples and how it is
integrated into an executable and testable target.
Test script:
---------------
//The example code that is referenced on the documentation page.
ZEND_FUNCTION(zend_leak_bytes)
{
zend_long leakbytes = 3;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &leakbytes) ==
FAILURE) {
return;
}
emalloc(leakbytes);
}
--
Edit bug report at https://bugs.php.net/bug.php?id=80397&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80397&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80397&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80397&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80397&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80397&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80397&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80397&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80397&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80397&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80397&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80397&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80397&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80397&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80397&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80397&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80397&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80397&r=mysqlcfg