|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-08-18 18:14 UTC] jani@php.net
[2008-08-19 09:04 UTC] cxscott at uk dot insight dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 11:00:02 2025 UTC |
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