note 9107 modified in language.oop by irc-html

From: Date: Sat, 19 Jan 2002 19:41:38 +0000
Subject: note 9107 modified in language.oop by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25272@lists.php.net to get a copy of this message
[Editor's note: function's and method's names are *not* case sensitive in PHP, this is a known characteristic of the language, so it is no wonder that the behavior commented here was observed.] CORRECTION FROM THE PREVIOUS POST I noticed the following: class a { function something() { echo "class a something"; } } class SomeThing extends a { function SomeThing (){ echo "SomeThing constructor"; } } mySomeThing=new SomeThing; mySomeThing->something(); would output SomeThing cunstructor SomeThing cunstructor instead of SomeThing cunstructor class a something I had to rename the function in class a to aSomething and call it with mySomeThing->aSomething() to get it to work properly. I am using php3, and I don't know if this was fixed in php4 --was-- [Editor's note: function's and method's names are *not* case sensitive in PHP, this is a known characteristic of the language, so it is no wonder that the behavior commented here was observed.] CORRECTION FROM THE PREVIOUS POST I noticed the following: <PRE> class a { function something() { echo "class a something"; } } class SomeThing extends a { function SomeThing (){ echo "SomeThing constructor"; } } mySomeThing=new SomeThing; mySomeThing->something(); </PRE> would output SomeThing cunstructor SomeThing cunstructor instead of SomeThing cunstructor class a something I had to rename the function in class a to aSomething and call it with mySomeThing->aSomething() to get it to work properly. I am using php3, and I don't know if this was fixed in php4 http://www.php.net/manual/en/language.oop.php

« previous php.notes (#25272) next »