note 36820 added to language.oop

From: Date: Thu, 23 Oct 2003 18:44:22 +0000
Subject: note 36820 added to language.oop
Groups: php.notes 
Request: Send a blank email to php-notes+get-59181@lists.php.net to get a copy of this message
Under PHP Version 4.2.2 classes that do not contain variables will be considered NULL when they are initialized. class A { function A() { } } class B { var $b; function B() { } } $a = new A(); $b = new B(); print( "<br />( a == NULL ): " . ($a==NULL) ); print( "<br />( b == NULL ): " . ($b==NULL) ); The output for this will be: ( a == NULL ): 1 ( b == NULL ): ---- Manual Page -- http://www.php.net/manual/en/language.oop.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+36820 Delete -- http://master.php.net/manage/user-notes.php?action=delete+36820&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+36820&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#59181) next »