MOTOSHARE 🚗🏍️
Turning Idle Vehicles into Shared Rides & Earnings

From Idle to Income. From Parked to Purpose.
Earn by Sharing, Ride by Renting.
Where Owners Earn, Riders Move.
Owners Earn. Riders Move. Motoshare Connects.

With Motoshare, every parked vehicle finds a purpose. Owners earn. Renters ride.
🚀 Everyone wins.

Start Your Journey with Motoshare

Class & Object(php OOPS concept)

OOPS ( Object Oriented Programming System)

Object means a real-world entity such as a pen, chair, table, computer, watch, etc. Object-Oriented Programming is a methodology  to design a program using classes and objects. It simplifies software development and maintenance by providing some concepts.

PHP(Hypertext preprocessor) Programming Patterns:

1)Procedural / Core PHP

2)Object Oriented (Object Oriented method is more popular then Core PHP )

OBJECT ORIENTED Advantage

  • Code more Modular and Reusable
  • Well Organized Code
  • Easier to debug
  • Best for medium to large website projects

Its MVC Frameworks are:-

Codeigniter, laravel, CakePHP, Symfony, Yii, Zend.

  What is Class?

A PHP class is a group of values with a set of operations to manipulate this values. Classes facilitate modularity and information hiding. Classes are used to define a new data type.

What is Object?

 Object is a compound data type,  Values of more than one types can be stored together in a single variable. Object is an instance of  user defined class.

Rules :

  • A variable starts with the $ sign, followed by the name of the variable.
  • A variable name must start with a letter or the underscore character.
  • A variable name cannot start with a number.
  • It can’t be PHP reserved word.
  • You can’t assign computed value inside a class. ($a = 12+5; )
  • You can’t concatenate in the class.(public $name=”ravi”.”Kumar”;)

Example:-

https://gist.github.com/AvinashKumar33/504957d7954d855c3f86134af10c3915

OUTPUT:-

fun1

Example;-

https://gist.github.com/AvinashKumar33/ef54d82d290a3e705635cfacc5173b6a

OUTPUT:-

Employee Detail

Name : ram
Age : 25
Salary : 20000

Related Posts

Learn Nagios Monitoring Skills in Mumbai

In a city that defines ambition and speed, Mumbai’s technological heartbeat never slows down. From the towering corporate headquarters in Bandra-Kurla Complex to the innovative tech parks…

Mastering Nagios in Kolkata: Your Key to a Better IT Career

In today’s fast-moving IT world, keeping your company’s systems running smoothly is more important than ever. For IT professionals in Kolkata, learning how to monitor these systems…

Learn Nagios Monitoring Systems Easily in Hyderabad

In today’s digital world, keeping computer systems running smoothly is crucial for every business. Whether you’re part of a small startup or a large corporation, knowing what’s…

Learn Nagios Monitoring Skills in Chennai Classes

In today’s technology world, keeping computer systems working well is important for every business. Whether you work at a small company or big organization, you need to…

Learn Monitoring Skills with Expert Nagios Classes in Bangalore

In today’s fast-paced technology landscape, keeping systems running smoothly is not just important—it’s essential for business survival. Whether you’re managing a small website or a large enterprise…

Mastering Database Skills with Expert MySQL Guidance

In today’s world, data is everywhere. From small businesses to large companies, everyone needs to store and manage information effectively. That’s where databases come in, and among…

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x