Doc #79625 [NEW]: Internal classes in docs or parse error ?

From: Date: Sun, 24 May 2020 21:25:29 +0000
Subject: Doc #79625 [NEW]: Internal classes in docs or parse error ?
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17613@lists.php.net to get a copy of this message
From:             bugs dot php dot net_nospam at adviesenzo dot nl
Operating system: N/A
PHP version:      Irrelevant
Package:          OCI8 related
Bug Type:         Documentation Problem
Bug description:Internal classes in docs or parse error ?

Description:
------------
Regards: https://www.php.net/manual/en/book.oci8.php

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:
https://github.com/php/php-src/blob/cebe750f460b8060ab21ae1e21980098f3f5b8e2/ext/oci8/oci8.c#L1050-L1051

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: https://3v4l.org/WpIK4

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 PHP.net manual.

---
From manual page: https://php.net/class.OCI-Collection
---


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

-- 
Edit bug report at https://bugs.php.net/bug.php?id=79625&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=79625&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=79625&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=79625&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=79625&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=79625&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=79625&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=79625&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=79625&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=79625&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=79625&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79625&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=79625&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=79625&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=79625&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=79625&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=79625&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=79625&r=mysqlcfg


Thread (1 message)

  • bugs dot php dot net_nospam at adviesenzo dot nl
« previous php.doc.bugs (#17613) next »