Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
09 OO PHP Register

09 OO PHP Register

Ratings: (0)|Views: 43|Likes:
Published by Geshan Manandhar

More info:

Published by: Geshan Manandhar on Feb 20, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less





PHP Day 09PHP Day 09
Geshan ManandharGeshan ManandharDeveloper,Developer, Young Innovations Private Limited Young Innovations Private Limitedwww.geshanmanandhar.comwww.geshanmanandhar.com
GeshanManandhar.com 2
Classes and ObjectsClasses and Objects
Objects mirror real life objects.Objects mirror real life objects.
OO programming focuses on what andOO programming focuses on what andhow of programming rather that just how.how of programming rather that just how.
Classes are the blueprint andClasses are the blueprint andobjects/instance are the implementationobjects/instance are the implementationof the classes.of the classes.
 They help us to code programs as we They help us to code programs as wefunction in real life.function in real life.
GeshanManandhar.com 3
A simple person classA simple person class
<?php<?phpclass person {class person {public $name; //public by defaultpublic $name; //public by defaultpublic $height;public $height;private $pinn_number;private $pinn_number;function __construct($persons_name) {function __construct($persons_name) {//constructor//constructor$this->name = $persons_name;$this->name = $persons_name;}}function set_name($new_name) {function set_name($new_name) {$this->name = $new_name;$this->name = $new_name;}}//contd…//contd…

Activity (7)

You've already reviewed this. Edit your review.
1 hundred reads
IhsanMedia Corp liked this
14ndcc liked this
14ndcc liked this
Vivek Athreya liked this
Vivek Athreya liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->