ID:               45853
 User updated by:  cxscott at uk dot insight dot com
 Reported By:      cxscott at uk dot insight dot com
 Status:           Bogus
-Bug Type:         Class/Object related
+Bug Type:         OCI8 related
 Operating System: Red Hat Linux (2.6.9-42.ELsmp)
 PHP Version:      5.2.6
 New Comment:

Then I guess the issue is with the OCI-Lob class - which comes from
PHP's OCI8 extension. If hyphen is not allowed in class names, why on
Earth is it using a hyphen?!

Whichever way you cut it, it should be possible to do this.


Previous Comments:
------------------------------------------------------------------------

[2008-08-18 18:14:37] [EMAIL PROTECTED]

Of course it does, - is not allowed char in
class/variable/function/constant names.

------------------------------------------------------------------------

[2008-08-18 14:58:44] cxscott at uk dot insight dot com

Description:
------------
instanceof fails to detect that an object is an instance of OCI-Lob
(possibly due to the hyphen?)

deprecated function is_a() works correctly with a value of is

Reproduce code:
---------------
    $conn = oci_connect('username', 'password', 'database');

    $lob = oci_new_descriptor($conn, OCI_D_LOB);

    if ($lob instanceof OCI-Lob) {
        echo 'instanceof says $lob IS an OCI-Lob<br />';
    } else {
        echo 'instanceof says $lob is NOT an OCI-Lob!<br />';
    }

    if (is_a($lob, 'OCI-Lob')) {
        echo 'is_a says $lob IS an OCI-Lob<br />';
    } else {
        echo 'is_a says $lob is NOT an OCI-Lob!<br />';
    }

    echo '$lob is: ' . get_class($lob) . '<br />';

Expected result:
----------------
instanceof says $lob IS an OCI-Lob!
is_a says $lob IS an OCI-Lob
$lob is: OCI-Lob

Actual result:
--------------
instanceof says $lob is NOT an OCI-Lob!
is_a says $lob IS an OCI-Lob
$lob is: OCI-Lob


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45853&edit=1

Reply via email to