|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
37 - 14 = ?
Subscribe to this entry?

 [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: Mon Oct 18 20:03:33 2021 UTC