PHP is a server side scripting language designed for web development. It was created by Rasmus Lerdorf in 1994, and is now the most popular open source language on GitHub.
PHP can be used in standalone applications as well as web development, but it's best known for its use creating dynamic web pages using variables, functions and objects.
PHP is an interpreted language, i.e. there is no need for compilation.
PHP is an interpreted language, i.e. there is no need for compilation.
PHP is a loosely typed language.
PHP code is written in plain text and compiled on the fly, as and when required during runtime to execute the program.
PHP is platform independent language which can be used on any platform (operating system) like Windows, Linux or Mac OS X etc.,
PHP is an object oriented programming language, but it not purely object oriented since it contains primitive types which are not objects.
Let's discuss the non-primitive types and their corresponding objects in PHP.
The string type is represented by the class string.
The numeric type double is represented by the class double.
The array type is represented by the class array.
In PHP, these objects have some methods that you can use to handle them. These methods are built into each object; therefore, it does not require any new code to be written for handling these objects since they are already built into PHP itself!
Yes php is an object oriented programming language but its not purely object-oriented
The answer to this question is yes. PHP, like many other programming languages, supports object-oriented programming in some way or form.
However, the way it does it is not pure OOP.
In PHP you can't create classes that inherit from each other. Instead what you do is create a class and then create an object of this class which will have all the properties and methods of that class. This isn't as flexible as multiple inheritance but it does make things easier for beginners to understand how OOP works in PHP because it's less complex than using multiple inheritance (which can be very confusing).
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.