php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11040 Array does not return class from get_class()
Submitted: 2001-05-22 23:15 UTC Modified: 2001-05-22 23:17 UTC
From: geneva1999 at yahoo dot com Assigned:
Status: Not a bug Package: *Function Specific
PHP Version: 4.0.5 OS: Sun Solaris 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: geneva1999 at yahoo dot com
New email:
PHP Version: OS:

 

 [2001-05-22 23:15 UTC] geneva1999 at yahoo dot com
$arr = Array();
$arr[0] = 5;
$arr[1] = 3;

$cl = get_class($arr);



if($cl == "") print "error: get_class returned nothing";

//  the if statment is true, and error is printed.
//   I tried this on a Linux 2.2 server and $cl = "Array"

// BUT:  If you do this:"
print $arr;
//  "Array" will display in the browser.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Dec 05 15:03:33 2021 UTC