|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79625 Internal classes in docs or parse error ?
Submitted: 2020-05-24 21:25 UTC Modified: 2020-05-25 20:38 UTC
From: bugs dot php dot net_nospam at adviesenzo dot nl Assigned: cmb (profile)
Status: Duplicate Package: OCI8 related
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
 [2020-05-24 21:25 UTC] bugs dot php dot net_nospam at adviesenzo dot nl

The OCI8 extension documentation shows there are two classes in this extension `OCI-Collection` and `OCI-Lob`.

I have verified these classes are defined as such in the source code:

However, these classes are not usable in userland code as they don't comply with the PHP rules for naming classes and would result a parse error in any code using them:

If these classes are internal classes in C, I would not expect them to be shown in the documentation.

If these classes _are_ intended to be used in userland code, they need renaming as they are currently unusable.

I'm opening this issue to verify the intention behind these classes and if they are only intended as internal C classes, I propose that the documentation about these classes be removed from the manual.

From manual page:

Test script:
$oci8 = new OCI-Collection();
$closure = function(OCI-Lob $lob) {};

Expected result:
No parse error.

Actual result:
Parse error: syntax error, unexpected '-', expecting variable (T_VARIABLE) in /in/WpIK4 on line 4


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-24 21:58 UTC]
-Status: Open +Status: Verified -Type: Documentation Problem +Type: Bug
 [2020-05-24 21:58 UTC]
Note that you can class_alias them, or construct them through variable variables syntax.

Even if the classes are internal, they really shouldn't be named like that.
 [2020-05-25 15:51 UTC]
-Status: Verified +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2020-05-25 15:51 UTC]
This is a duplicate of bug #58319.
 [2020-05-25 20:38 UTC] bugs dot php dot net_nospam at adviesenzo dot nl
@cmb Thanks for finding that one. I did search, but must have overlooked it.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 09:01:30 2024 UTC