SlideShare a Scribd company logo
Why PHP?
What does PHP stand for?
 Personal Homepage

 PHP: Hypertext Preprocessor (recursive acronym)
 Created by Rasmus Lerdorf (1994)
It’s FREE!!

 PHP is open-source
Platform Independent
 Can be deployed/installed in different OS
Great Documentation

 php.net
 Functions are well explained + informative

examples
Large and Active Community

 stackoverflow
 php.net
 github
 Etc...
Easy to learn

 Simple syntax
 Well documented
 Lots of tutorials everywhere
 Lots of premade libraries
WHY PHP
 It’s Free
 Platform Independent

 Great Documentation
 Large and Active Community
 Easy to learn
OBJECT ORIENTED
PROGRAMMING
Object Oriented Programming
 A programming concept that treats functions and

data as objects.
 A programming methodology based on objects,
instead of functions and procedures.
“I explain that procedural program is built around
the "verbs" of the system, the things you want the
system to do, whereas object-oriented
programming is build about the "nouns," the
things in the system, and what they are capable
of.”
Object and Class
CLASS
 is a "template"/"blueprint" that is used to

create objects
 usually represents a noun, such as person, place or
thing.
CLASS

class PointGuard
{
}
OBJECT
 In real world object is a material thing that can be

seen and touched.
 In OOP, object is a self-contained entity that
consist of both data and procedures.
 An instance of a class
Give examples of real life class and object.
INSTANCE
INSTANCE
 layman's term - a case or occurrence of anything
 a single copy of an object, there might be one or

several objects, but an instance is a specific copy,
to which you can have a reference
$instance = new PointGuard();
INHERITANCE
INHERITANCE
 biology - the genetic characters transmitted from

parents to offspring
 OOP - provides reusability of codes. We can add
additional codes to an existing class without
modifying it.
 can be defined as the process of one object
acquires the properties of another by making
subclasses (parent-child relationship)
INHERITANCE
<?php
class BasketballPosition
{
// some methods and properties
}
class PointGuard extends BasketballPosition
{
// some methods and properties
}
Give examples of inheritance.
Class Properties and Methods
 Height
 Weight
 Pass
 Dribble
 Shoot
 Rebound
 Block
Class Properties
 also know as data members and is used to hold

data of a class.
 The data that it holds are specific to the nature of
the class in which it has been defined.
Class Properties
class PointGuard
{
public $name;
public $ball_handling_level;
}
Class Methods
 functions that are associated with the class
 functions that can be involve in the class property

processing
Class Methods
class PointGuard
{
public $name;
public $ball_handling_level;

public function createPlay()
{
// some processing here
}
}
Encapsulation
Encapsulation
 facilitates the bundling of data with

the methods (or other functions) operating on that
data.
 restricting access to some of the object’s
components.
 used to hide the values or state of a structured data
object inside a class, preventing unauthorized
parties' direct access to them.
Encapsulation
Example :
Courting a girl
Encapsulation
 Access modifiers/Visibility

private
 property and method can be accessed only inside the
class itself and can't be accessed anywhere else
 protected
 property and method can be accessed only inside the
class itself and inside child classes.
 public
 allows the property/method to be accessed from
anywhere of code

Private
class Love
{
private $hearbeat_per_second = 100;
public function getHeartBeatPerSec()
{
return $this->heartbeat_per_second;
}
}
class Valentines extends Love
{
public function getHeartBeatPerSecWhenNear()
{
return $this->heartbeat_per_second * 2; // will produce an error
}
}
$love = new Love();
echo $love->getHeartBeatPerSec(); // will output 100
echo $love->heartbeat_per_second; // will produce an error
Protected
class Love
{
protected $hearbeat_per_second = 100;
public function getHeartBeatPerSec()
{
return $this->heartbeat_per_second;
}
}
class Valentines extends Love
{
public function getHeartBeatPerSecWhenNear()
{
return $this->heartbeat_per_second * 2; // will return 200
}
}
$love = new Love();
echo $love->getHeartBeatPerSec(); // will output 100
echo $love->heartbeat_per_second; // will produce an error
Public
class Love
{
public $hearbeat_per_second = 100;
public function getHeartBeatPerSec()
{
return $this->heartbeat_per_second;
}
}
class Valentines extends Love
{
public function getHeartBeatPerSecWhenNear()
{
return $this->heartbeat_per_second * 2; // will return 200
}
}
$love = new Love();
echo $love->getHeartBeatPerSec(); // will output 100
echo $love->heartbeat_per_second; // will output 100
Choosing the Right Visibility
START

Accessed
externally?

Y

public

N
Deny to
children?
N
protected

Y

private
PHP OOP
 Object and Class
 Instance

 Inheritance
 Class Properties and Methods
 Encapsulation
Introduction to Git and Github
Git whhaaat???
 Is a source/version control management software.
 Is a software that allows you to track the changes

that you make to individual files.
Github eeeeee??
 is a web-based hosting service for software

development projects that use the Git revision
control system
 “social coding”
Why u no use git and github??
Why u no use git and github??
 Git can track your changes to your projects.

 You can go back to a certain change you made that

you want to recover.
Why u no use git and github??
Why u no use git and github??
 Github lets you collaborate with other developers

or your project teammates by adding comments or
suggestions on commits.
 You can also contribute to public/open source
projects. (eg. Facebook SDK, Codeigniter, PHP,
etc...)
 Share your codes to public and get feedback from
large community of developers.
Why u no use git and github??
Why u no use git and github??
Commands Overview
 git init

Initializes a git repository.
git status
 Check your changes made (untracked files, modified files, staged files)
git commit
 Save your changes into one commit history.
git push
 Push your changes in the remote repository.
git pull
 Pull changes from remote repository and apply it to your local repository.
git fetch
 Fetch changes from remote repository but changes will not apply to your
local repository







Git and Github
 Git and github can be effectively used in project

collaborations.
 Can improve a developer’s coding.
 Can avoid overriding or duplicating codes
 Not just a developer tool
“Whenever you are asked if you can do a job,
tell'em, Certainly, I can! Then get busy and find
out how to do it.”
- Theodore Roosevelt
Intro to OOP PHP and Github
Ad

Recommended

Introduction to PHP OOP
Introduction to PHP OOP
fakhrul hasan
 
Intermediate OOP in PHP
Intermediate OOP in PHP
David Stockton
 
Introduction to OOP with PHP
Introduction to OOP with PHP
Michael Peacock
 
OOP in PHP
OOP in PHP
Alena Holligan
 
Oops concepts in php
Oops concepts in php
CPD INDIA
 
Object oreinted php | OOPs
Object oreinted php | OOPs
Ravi Bhadauria
 
Oops in PHP By Nyros Developer
Oops in PHP By Nyros Developer
Nyros Technologies
 
Php oop presentation
Php oop presentation
Mutinda Boniface
 
Php Oop
Php Oop
mussawir20
 
Oops in PHP
Oops in PHP
Mindfire Solutions
 
Object oriented programming in php 5
Object oriented programming in php 5
Sayed Ahmed
 
Intro to OOP and new features in PHP 5.3
Intro to OOP and new features in PHP 5.3
Adam Culp
 
Oop in-php
Oop in-php
Rajesh S
 
PHP Classes and OOPS Concept
PHP Classes and OOPS Concept
Dot Com Infoway - Custom Software, Mobile, Web Application Development and Digital Marketing Company
 
A Gentle Introduction To Object Oriented Php
A Gentle Introduction To Object Oriented Php
Michael Girouard
 
Class 7 - PHP Object Oriented Programming
Class 7 - PHP Object Oriented Programming
Ahmed Swilam
 
PHP- Introduction to Object Oriented PHP
PHP- Introduction to Object Oriented PHP
Vibrant Technologies & Computers
 
OOPS Characteristics (With Examples in PHP)
OOPS Characteristics (With Examples in PHP)
baabtra.com - No. 1 supplier of quality freshers
 
PHP - Introduction to Object Oriented Programming with PHP
PHP - Introduction to Object Oriented Programming with PHP
Vibrant Technologies & Computers
 
09 Object Oriented Programming in PHP #burningkeyboards
09 Object Oriented Programming in PHP #burningkeyboards
Denis Ristic
 
Introduction to php oop
Introduction to php oop
baabtra.com - No. 1 supplier of quality freshers
 
Object Oriented Programming in PHP
Object Oriented Programming in PHP
Lorna Mitchell
 
Oops in php
Oops in php
sanjay joshi
 
Object Oriented PHP5
Object Oriented PHP5
Jason Austin
 
Php oop (1)
Php oop (1)
Sudip Simkhada
 
Intermediate OOP in PHP
Intermediate OOP in PHP
David Stockton
 
Class and Objects in PHP
Class and Objects in PHP
Ramasubbu .P
 
Basics of Object Oriented Programming in Python
Basics of Object Oriented Programming in Python
Sujith Kumar
 
Intermediate oop in php
Intermediate oop in php
David Stockton
 
Beginning OOP in PHP
Beginning OOP in PHP
David Stockton
 

More Related Content

What's hot (20)

Php Oop
Php Oop
mussawir20
 
Oops in PHP
Oops in PHP
Mindfire Solutions
 
Object oriented programming in php 5
Object oriented programming in php 5
Sayed Ahmed
 
Intro to OOP and new features in PHP 5.3
Intro to OOP and new features in PHP 5.3
Adam Culp
 
Oop in-php
Oop in-php
Rajesh S
 
PHP Classes and OOPS Concept
PHP Classes and OOPS Concept
Dot Com Infoway - Custom Software, Mobile, Web Application Development and Digital Marketing Company
 
A Gentle Introduction To Object Oriented Php
A Gentle Introduction To Object Oriented Php
Michael Girouard
 
Class 7 - PHP Object Oriented Programming
Class 7 - PHP Object Oriented Programming
Ahmed Swilam
 
PHP- Introduction to Object Oriented PHP
PHP- Introduction to Object Oriented PHP
Vibrant Technologies & Computers
 
OOPS Characteristics (With Examples in PHP)
OOPS Characteristics (With Examples in PHP)
baabtra.com - No. 1 supplier of quality freshers
 
PHP - Introduction to Object Oriented Programming with PHP
PHP - Introduction to Object Oriented Programming with PHP
Vibrant Technologies & Computers
 
09 Object Oriented Programming in PHP #burningkeyboards
09 Object Oriented Programming in PHP #burningkeyboards
Denis Ristic
 
Introduction to php oop
Introduction to php oop
baabtra.com - No. 1 supplier of quality freshers
 
Object Oriented Programming in PHP
Object Oriented Programming in PHP
Lorna Mitchell
 
Oops in php
Oops in php
sanjay joshi
 
Object Oriented PHP5
Object Oriented PHP5
Jason Austin
 
Php oop (1)
Php oop (1)
Sudip Simkhada
 
Intermediate OOP in PHP
Intermediate OOP in PHP
David Stockton
 
Class and Objects in PHP
Class and Objects in PHP
Ramasubbu .P
 
Basics of Object Oriented Programming in Python
Basics of Object Oriented Programming in Python
Sujith Kumar
 
Object oriented programming in php 5
Object oriented programming in php 5
Sayed Ahmed
 
Intro to OOP and new features in PHP 5.3
Intro to OOP and new features in PHP 5.3
Adam Culp
 
Oop in-php
Oop in-php
Rajesh S
 
A Gentle Introduction To Object Oriented Php
A Gentle Introduction To Object Oriented Php
Michael Girouard
 
Class 7 - PHP Object Oriented Programming
Class 7 - PHP Object Oriented Programming
Ahmed Swilam
 
PHP - Introduction to Object Oriented Programming with PHP
PHP - Introduction to Object Oriented Programming with PHP
Vibrant Technologies & Computers
 
09 Object Oriented Programming in PHP #burningkeyboards
09 Object Oriented Programming in PHP #burningkeyboards
Denis Ristic
 
Object Oriented Programming in PHP
Object Oriented Programming in PHP
Lorna Mitchell
 
Object Oriented PHP5
Object Oriented PHP5
Jason Austin
 
Intermediate OOP in PHP
Intermediate OOP in PHP
David Stockton
 
Class and Objects in PHP
Class and Objects in PHP
Ramasubbu .P
 
Basics of Object Oriented Programming in Python
Basics of Object Oriented Programming in Python
Sujith Kumar
 

Viewers also liked (7)

Intermediate oop in php
Intermediate oop in php
David Stockton
 
Beginning OOP in PHP
Beginning OOP in PHP
David Stockton
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01
Adil Kakakhel
 
Basic concepts of object oriented programming
Basic concepts of object oriented programming
Sachin Sharma
 
Introduction to Object Oriented Programming
Introduction to Object Oriented Programming
Moutaz Haddara
 
Object Oriented Programming Concepts
Object Oriented Programming Concepts
thinkphp
 
AI, Blockchain, IOT, Evolution or Singularity? Digital Identity And Digital ...
AI, Blockchain, IOT, Evolution or Singularity? Digital Identity And Digital ...
Dinis Guarda
 
Intermediate oop in php
Intermediate oop in php
David Stockton
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01
Adil Kakakhel
 
Basic concepts of object oriented programming
Basic concepts of object oriented programming
Sachin Sharma
 
Introduction to Object Oriented Programming
Introduction to Object Oriented Programming
Moutaz Haddara
 
Object Oriented Programming Concepts
Object Oriented Programming Concepts
thinkphp
 
AI, Blockchain, IOT, Evolution or Singularity? Digital Identity And Digital ...
AI, Blockchain, IOT, Evolution or Singularity? Digital Identity And Digital ...
Dinis Guarda
 
Ad

Similar to Intro to OOP PHP and Github (20)

Lecture-10_PHP-OOP.pptx
Lecture-10_PHP-OOP.pptx
ShaownRoy1
 
Demystifying Object-Oriented Programming - PHP UK Conference 2017
Demystifying Object-Oriented Programming - PHP UK Conference 2017
Alena Holligan
 
Demystifying Object-Oriented Programming #ssphp16
Demystifying Object-Oriented Programming #ssphp16
Alena Holligan
 
Only oop
Only oop
anitarooge
 
Take the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphp
Alena Holligan
 
c91632a4-2e92-4edf-b750-358da15ed1b1.pptx
c91632a4-2e92-4edf-b750-358da15ed1b1.pptx
ajayparmeshwarmahaja
 
Demystifying Object-Oriented Programming - PHP[tek] 2017
Demystifying Object-Oriented Programming - PHP[tek] 2017
Alena Holligan
 
Demystifying Object-Oriented Programming #phpbnl18
Demystifying Object-Oriented Programming #phpbnl18
Alena Holligan
 
OOPS IN PHP.pptx
OOPS IN PHP.pptx
rani marri
 
Demystifying Object-Oriented Programming - ZendCon 2016
Demystifying Object-Oriented Programming - ZendCon 2016
Alena Holligan
 
Dependency Injection for PHP
Dependency Injection for PHP
mtoppa
 
PHP Fundamentals: A Comprehensive Introduction
PHP Fundamentals: A Comprehensive Introduction
Nilesh Valva
 
Best practices tekx
Best practices tekx
Lorna Mitchell
 
Ch8(oop)
Ch8(oop)
Chhom Karath
 
Basic Oops concept of PHP
Basic Oops concept of PHP
Rohan Sharma
 
Objects, Testing, and Responsibility
Objects, Testing, and Responsibility
machuga
 
Introduction Php
Introduction Php
sanjay joshi
 
Reflection-In-PHP
Reflection-In-PHP
Mindfire Solutions
 
Demystifying Object-Oriented Programming - Lone Star PHP
Demystifying Object-Oriented Programming - Lone Star PHP
Alena Holligan
 
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
Dhivyaa C.R
 
Lecture-10_PHP-OOP.pptx
Lecture-10_PHP-OOP.pptx
ShaownRoy1
 
Demystifying Object-Oriented Programming - PHP UK Conference 2017
Demystifying Object-Oriented Programming - PHP UK Conference 2017
Alena Holligan
 
Demystifying Object-Oriented Programming #ssphp16
Demystifying Object-Oriented Programming #ssphp16
Alena Holligan
 
Take the Plunge with OOP from #pnwphp
Take the Plunge with OOP from #pnwphp
Alena Holligan
 
c91632a4-2e92-4edf-b750-358da15ed1b1.pptx
c91632a4-2e92-4edf-b750-358da15ed1b1.pptx
ajayparmeshwarmahaja
 
Demystifying Object-Oriented Programming - PHP[tek] 2017
Demystifying Object-Oriented Programming - PHP[tek] 2017
Alena Holligan
 
Demystifying Object-Oriented Programming #phpbnl18
Demystifying Object-Oriented Programming #phpbnl18
Alena Holligan
 
OOPS IN PHP.pptx
OOPS IN PHP.pptx
rani marri
 
Demystifying Object-Oriented Programming - ZendCon 2016
Demystifying Object-Oriented Programming - ZendCon 2016
Alena Holligan
 
Dependency Injection for PHP
Dependency Injection for PHP
mtoppa
 
PHP Fundamentals: A Comprehensive Introduction
PHP Fundamentals: A Comprehensive Introduction
Nilesh Valva
 
Basic Oops concept of PHP
Basic Oops concept of PHP
Rohan Sharma
 
Objects, Testing, and Responsibility
Objects, Testing, and Responsibility
machuga
 
Demystifying Object-Oriented Programming - Lone Star PHP
Demystifying Object-Oriented Programming - Lone Star PHP
Alena Holligan
 
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
Object Oriented PHP by Dr.C.R.Dhivyaa Kongu Engineering College
Dhivyaa C.R
 
Ad

Recently uploaded (20)

Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
Filipino 9 Maikling Kwento Ang Ama Panitikang Asiyano
Filipino 9 Maikling Kwento Ang Ama Panitikang Asiyano
sumadsadjelly121997
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
jutaydeonne
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Rajdeep Bavaliya
 
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
 
June 2025 Progress Update With Board Call_In process.pptx
June 2025 Progress Update With Board Call_In process.pptx
International Society of Service Innovation Professionals
 
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
 
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
IIT Kharagpur Quiz Club
 
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
jutaydeonne
 
HistoPathology Ppt. Arshita Gupta for Diploma
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
Sustainable Innovation with Immersive Learning
Sustainable Innovation with Immersive Learning
Leonel Morgado
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Paper 107 | From Watchdog to Lapdog: Ishiguro’s Fiction and the Rise of “Godi...
Rajdeep Bavaliya
 
Filipino 9 Maikling Kwento Ang Ama Panitikang Asiyano
Filipino 9 Maikling Kwento Ang Ama Panitikang Asiyano
sumadsadjelly121997
 
Hurricane Helene Application Documents Checklists
Hurricane Helene Application Documents Checklists
Mebane Rash
 
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
ENGLISH_Q1_W1 PowerPoint grade 3 quarter 1 week 1
jutaydeonne
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
K12 Tableau User Group virtual event June 18, 2025
K12 Tableau User Group virtual event June 18, 2025
dogden2
 
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Paper 108 | Thoreau’s Influence on Gandhi: The Evolution of Civil Disobedience
Rajdeep Bavaliya
 
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
 
VCE Literature Section A Exam Response Guide
VCE Literature Section A Exam Response Guide
jpinnuck
 
Vitamin and Nutritional Deficiencies.pptx
Vitamin and Nutritional Deficiencies.pptx
Vishal Chanalia
 
LDMMIA Yoga S10 Free Workshop Grad Level
LDMMIA Yoga S10 Free Workshop Grad Level
LDM & Mia eStudios
 
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
Great Governors' Send-Off Quiz 2025 Prelims IIT KGP
IIT Kharagpur Quiz Club
 
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
LAZY SUNDAY QUIZ "A GENERAL QUIZ" JUNE 2025 SMC QUIZ CLUB, SILCHAR MEDICAL CO...
Ultimatewinner0342
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
Q1_ENGLISH_PPT_WEEK 1 power point grade 3 Quarter 1 week 1
jutaydeonne
 
HistoPathology Ppt. Arshita Gupta for Diploma
HistoPathology Ppt. Arshita Gupta for Diploma
arshitagupta674
 
Pests of Maize: An comprehensive overview.pptx
Pests of Maize: An comprehensive overview.pptx
Arshad Shaikh
 
Sustainable Innovation with Immersive Learning
Sustainable Innovation with Immersive Learning
Leonel Morgado
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 

Intro to OOP PHP and Github

  • 2. What does PHP stand for?  Personal Homepage  PHP: Hypertext Preprocessor (recursive acronym)  Created by Rasmus Lerdorf (1994)
  • 3. It’s FREE!!  PHP is open-source
  • 4. Platform Independent  Can be deployed/installed in different OS
  • 5. Great Documentation  php.net  Functions are well explained + informative examples
  • 6. Large and Active Community  stackoverflow  php.net  github  Etc...
  • 7. Easy to learn  Simple syntax  Well documented  Lots of tutorials everywhere  Lots of premade libraries
  • 8. WHY PHP  It’s Free  Platform Independent  Great Documentation  Large and Active Community  Easy to learn
  • 10. Object Oriented Programming  A programming concept that treats functions and data as objects.  A programming methodology based on objects, instead of functions and procedures.
  • 11. “I explain that procedural program is built around the "verbs" of the system, the things you want the system to do, whereas object-oriented programming is build about the "nouns," the things in the system, and what they are capable of.”
  • 13. CLASS  is a "template"/"blueprint" that is used to create objects  usually represents a noun, such as person, place or thing.
  • 15. OBJECT  In real world object is a material thing that can be seen and touched.  In OOP, object is a self-contained entity that consist of both data and procedures.  An instance of a class
  • 16. Give examples of real life class and object.
  • 18. INSTANCE  layman's term - a case or occurrence of anything  a single copy of an object, there might be one or several objects, but an instance is a specific copy, to which you can have a reference
  • 19. $instance = new PointGuard();
  • 21. INHERITANCE  biology - the genetic characters transmitted from parents to offspring  OOP - provides reusability of codes. We can add additional codes to an existing class without modifying it.  can be defined as the process of one object acquires the properties of another by making subclasses (parent-child relationship)
  • 22. INHERITANCE <?php class BasketballPosition { // some methods and properties } class PointGuard extends BasketballPosition { // some methods and properties }
  • 23. Give examples of inheritance.
  • 24. Class Properties and Methods  Height  Weight  Pass  Dribble  Shoot  Rebound  Block
  • 25. Class Properties  also know as data members and is used to hold data of a class.  The data that it holds are specific to the nature of the class in which it has been defined.
  • 26. Class Properties class PointGuard { public $name; public $ball_handling_level; }
  • 27. Class Methods  functions that are associated with the class  functions that can be involve in the class property processing
  • 28. Class Methods class PointGuard { public $name; public $ball_handling_level; public function createPlay() { // some processing here } }
  • 30. Encapsulation  facilitates the bundling of data with the methods (or other functions) operating on that data.  restricting access to some of the object’s components.  used to hide the values or state of a structured data object inside a class, preventing unauthorized parties' direct access to them.
  • 32. Encapsulation  Access modifiers/Visibility private  property and method can be accessed only inside the class itself and can't be accessed anywhere else  protected  property and method can be accessed only inside the class itself and inside child classes.  public  allows the property/method to be accessed from anywhere of code 
  • 33. Private class Love { private $hearbeat_per_second = 100; public function getHeartBeatPerSec() { return $this->heartbeat_per_second; } } class Valentines extends Love { public function getHeartBeatPerSecWhenNear() { return $this->heartbeat_per_second * 2; // will produce an error } } $love = new Love(); echo $love->getHeartBeatPerSec(); // will output 100 echo $love->heartbeat_per_second; // will produce an error
  • 34. Protected class Love { protected $hearbeat_per_second = 100; public function getHeartBeatPerSec() { return $this->heartbeat_per_second; } } class Valentines extends Love { public function getHeartBeatPerSecWhenNear() { return $this->heartbeat_per_second * 2; // will return 200 } } $love = new Love(); echo $love->getHeartBeatPerSec(); // will output 100 echo $love->heartbeat_per_second; // will produce an error
  • 35. Public class Love { public $hearbeat_per_second = 100; public function getHeartBeatPerSec() { return $this->heartbeat_per_second; } } class Valentines extends Love { public function getHeartBeatPerSecWhenNear() { return $this->heartbeat_per_second * 2; // will return 200 } } $love = new Love(); echo $love->getHeartBeatPerSec(); // will output 100 echo $love->heartbeat_per_second; // will output 100
  • 36. Choosing the Right Visibility START Accessed externally? Y public N Deny to children? N protected Y private
  • 37. PHP OOP  Object and Class  Instance  Inheritance  Class Properties and Methods  Encapsulation
  • 38. Introduction to Git and Github
  • 39. Git whhaaat???  Is a source/version control management software.  Is a software that allows you to track the changes that you make to individual files.
  • 40. Github eeeeee??  is a web-based hosting service for software development projects that use the Git revision control system  “social coding”
  • 41. Why u no use git and github??
  • 42. Why u no use git and github??  Git can track your changes to your projects.  You can go back to a certain change you made that you want to recover.
  • 43. Why u no use git and github??
  • 44. Why u no use git and github??  Github lets you collaborate with other developers or your project teammates by adding comments or suggestions on commits.  You can also contribute to public/open source projects. (eg. Facebook SDK, Codeigniter, PHP, etc...)  Share your codes to public and get feedback from large community of developers.
  • 45. Why u no use git and github??
  • 46. Why u no use git and github??
  • 47. Commands Overview  git init Initializes a git repository. git status  Check your changes made (untracked files, modified files, staged files) git commit  Save your changes into one commit history. git push  Push your changes in the remote repository. git pull  Pull changes from remote repository and apply it to your local repository. git fetch  Fetch changes from remote repository but changes will not apply to your local repository      
  • 48. Git and Github  Git and github can be effectively used in project collaborations.  Can improve a developer’s coding.  Can avoid overriding or duplicating codes  Not just a developer tool
  • 49. “Whenever you are asked if you can do a job, tell'em, Certainly, I can! Then get busy and find out how to do it.” - Theodore Roosevelt