php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #522 gettype() anomaly due to namespace confusion?
Submitted: 1998-07-08 14:46 UTC Modified: 1998-07-09 07:42 UTC
From: kk at shonline dot de Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0 Final Release OS: Solaris 2.5.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kk at shonline dot de
New email:
PHP Version: OS:

 

 [1998-07-08 14:46 UTC] kk at shonline dot de
Why does this code print "unknown type" and not "array"?

webuser@poe /home/www/servers/poe.shonline.de $ cgi/php
<?php
class auth { 
  var $auth = array(); 
 
  function auth() {
 
       printf("type = %s\n", gettype($this->auth));
  } 
}
 
$auth = new auth;
$auth->auth();
Content-type: text/html
 
type = unknown type
 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-07-09 07:42 UTC] ssb
gettype() now handles all types.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sun Jun 14 21:00:02 2026 UTC