php oop for dummies

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shelly

    php oop for dummies

    I know C, C++ and Java. I have been using "procedural " PHP. I get the list
    of classes for PHP, but I need a "PHP OOP for Dummies" on how to implement
    these. Any pointers to a tutotial?

    Shelly


  • Erwin Moller

    #2
    Re: php oop for dummies

    Shelly wrote:
    [color=blue]
    > I know C, C++ and Java. I have been using "procedural " PHP. I get the
    > list of classes for PHP, but I need a "PHP OOP for Dummies" on how to
    > implement
    > these. Any pointers to a tutotial?
    >
    > Shelly[/color]

    Hi Shelly,

    For starters:


    It covers all basic usage.
    If you are familiar with OOP, which you are since you did C++ and Java, PHP
    classes and OOP should be easy.
    Remember that PHP is used mostly in webpages, and all objects should be
    created within a 'pagesession', and die when request is finished (unless
    you take certain precautions).
    If you need them to live longer, you'll have to serialize them, store them
    somewhere (eg database or $_SESSION), and revive them where needed.
    Things like J2EE's ServletContext doesn't exists in PHP, as all runs in a
    per-request fashion.

    Hope that helps a bit.
    I think you'll have an easy time coming C++ and Java. :-)

    Good luck and regards,
    Erwin Moller

    Comment

    • sheldonlg@gmail.com

      #3
      Re: php oop for dummies

      Thanks. How silly of me not to think of RTFM. I'll read that.

      Comment

      Working...