Jump to content


Photo

Hi all, new here, from Fife Scotland

hello new scotland fife

  • Please log in to reply
1 reply to this topic

#1 GrahamMcGregor

GrahamMcGregor

    Newbie

  • New Members
  • Pip
  • 0 posts

Posted 14 January 2014 - 01:27 PM

Just wanted to say a quick hi to you all.

 

I have a fairly good grasp of procedural scripting with php but have been struggling with the object oriented side of things for longer than i care to remember. Time to get to grips with it and found a good tutorial here so thought i would join.

 

Cheers all

Graham



#2 gizmola

gizmola

    Advanced Member

  • Administrators
  • 4,102 posts
  • LocationLos Angeles, CA USA

Posted 14 January 2014 - 01:55 PM

Greetings, and good luck with OOP. 

 

One way to think about an object is as a struct/record, with an element that stores an array of pointers to functions.  That is the basic implementation for most languages AFAIK.

 

PHP has single inheritance, interfaces, support for scoping (public, private, protected) and some new tricks like traits.  If you can get the knack of static methods (imagine one magic object that the os creates for you) vs dynamic instantiation (ie.  Myclass::foo() vs.  $obj = new Myclass() ) you'll be well on your way. 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com