NYCPHP Meetup

NYPHP.org

[nycphp-talk] self:: or $this ?

Brian D. brian at realm3.com
Fri Nov 9 15:28:25 EST 2007


$this-> will not work when you are accessing a property in a static method.

More information:
http://php.net/manual/en/language.oop5.static.php

I recommend the book "PHP5 Objects, Patterns & Practices" if you want
to learn more about how to wield the OOP sword in PHP.

b.

On Nov 9, 2007 3:11 PM, Morgan Craft <morgan at forsalebyowner.com> wrote:
> Any reason why I should use $this->methodName()  over self::methodName()
>
> Or is the self::methodName() reserved only for working within a static
> method?
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>



-- 
realm3 web applications [realm3.com]
freelance consulting, application development
(423) 506-0349



More information about the talk mailing list