Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is my PHP code object oriented?

Tags:

oop

php

If I made my PHP code which would connect me to my MySQL database in a separate PHP file and made a require on the necessary pages of my website would the DB Connent PHP file be an Object Orentated item ?

like image 477
Oliver Bayes-Shelton Avatar asked Aug 06 '09 22:08

Oliver Bayes-Shelton


People also ask

Is PHP an object-oriented programming?

PHP is an object-oriented programming language that supports several concepts. Here are some of the popular OOPS concepts in PHP with real-time Here are some of the popular OOPS concepts in PHP with real-time examples.

Is PHP functional or object oriented?

Again, PHP is an example of an object oriented language and we can compare its procedural operations with its OOP implementations of the same functions; taking a mysqli prepared statement, for example.

When did PHP get OOP?

Other key features introduced in PHP 3.0 included object-oriented programming support and a far more powerful and consistent language syntax. In June, 1998, with many new developers from around the world joining the effort, PHP 3.0 was announced by the new PHP Development Team as the official successor to PHP/FI 2.0.


1 Answers

OOP is a concept. So if you include a file via the require command and this included file utilizes OOP then your script uses the concept of OOP. If not then your mainscript doesn't include it, too.

like image 198
Henrik P. Hessel Avatar answered Oct 05 '22 11:10

Henrik P. Hessel