|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80397 The documentation on this page is ambiguous about example language
Submitted: 2020-11-21 20:03 UTC Modified: 2020-11-22 13:43 UTC
From: jacob at jacobthompson dot com Assigned: cmb (profile)
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: jacob at jacobthompson dot com
New email:
PHP Version: OS:


 [2020-11-21 20:03 UTC] jacob at jacobthompson dot com
The script example here ( 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_long leakbytes = 3;

    if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &leakbytes) == FAILURE) {



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-21 20:10 UTC]
Internals 2 is about the Zend Engine 2 which powered PHP 5, and most of the info is relevant to the early versions of it.

More recent internals documentation is best found at and
 [2020-11-22 13:43 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2020-11-22 13:43 UTC]
The documentation states:

| While executing in a debug environment, configured with
| --enable-debug and --enable-zend-test, the leak function used in
| the next example is actually implemented by the engine and is
| available to call in userland.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jun 23 18:01:28 2021 UTC