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
 [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

Add a Patch

Pull Requests

Add a Pull Request

History

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

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 01:01:30 2024 UTC