ID: 45853
Updated by: [EMAIL PROTECTED]
Reported By: cxscott at uk dot insight dot com
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Red Hat Linux (2.6.9-42.ELsmp)
PHP Version: 5.2.6
New Comment:
Of course it does, - is not allowed char in
class/variable/function/constant names.
Previous Comments:
------------------------------------------------------------------------
[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