Fw: [PHP-WIN] a interesting direction about Class in PHP.
| From: | Toby Butzon | Date: | Mon, 18 Dec 2000 20:16:18 +0000 |
| Subject: | Fw: [PHP-WIN] a interesting direction about Class in PHP. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-30908@lists.php.net to get a copy of this message | ||
I'm kind of curious to see if anybody has anything to say about this :/
Don't flame me if it's already been up here ... nevermind, flame me if ya
feel like it, those can be fun to read if I'm bored later :)
Toby Butzon
[ criticism spurs improvement ]
----- Original Message -----
From: "Adam Bear" <bbbbear@china.com>
To: <php-windows@lists.php.net>
Sent: Monday, December 18, 2000 11:16 AM
Subject: [PHP-WIN] a interesting direction about Class in PHP.
: Maybe I should not post this message in PHP-windowss list, but
: I only work on windows and only subscribed this list.so it would
: be appreciated if some one repost this message in other list.
: Today,when I run the test sample in source code of PHP,I found
: a interesting direction to use class method, see the following code:
: <? class foo {
: var $hahaha;
: function foo() {
: print "I am foo\n";
: }
: function bar() {
: print "Hey there!\n";
: }
: };
: class foo2 extends foo{
: function foo2(){
: print "Het I am in foo2\n";
: }
: }
: foo::bar() file://haha, can't image we can use "::" operator in PHP!
: foo2::bar() file://even in a descended class can call his father's
method.
: ?>
:
: This is really true, all code above is tested by me in PHP4.04b and
PHP4.0.1,
: I think it can work in versions above PHP4.
: This direction more like the static method calls in C++,it is very
useful in
: OO program,we can use a class method directly without create a object
instance of
: the class.
: I search through the documents of PHP but can't find a word about this
operator,
: maybe PHP developer term think this operator useless in PHP or maybe this
is a future
: feature which will be full supported in the next version of PHP.
: I am a chinese so sorry for my pool english. Enjoy youself.
:
: Sincerely
:
: Adam Bear
: &&&&&&&&&&&&
: \~~~~~~~~/
: ( $ $ )
: { "" }
: =======================oOOo----()-----oOOo========
: Wow.... Gold is there!
: +-----------------------------------------------+
: | My E-Mail ====> xcbear@netease.com
: or bbbbear@china.com
: +----------------------------------Oooo-----------+
: oooO ( )
: ( ) ) /
: \ ( (_/
: \_)
:
:
:
:
:
:
:
: --
: PHP Windows Mailing List (http://www.php.net/)
: To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
: For additional commands, e-mail: php-windows-help@lists.php.net
: To contact the list administrators, e-mail: php-list-admin@lists.php.net
:
: