Is it acceptable to use a mix of object oriented style with procedural style in coding PHP?

前端 未结 3 1913
闹比i
闹比i 2020-12-06 06:37

So before I always used to use procedural style to code php, such as:

mysqli_connect

or

mysqli_prepare

An

3条回答
  •  抹茶落季
    2020-12-06 06:56

    Using both will not break your code and technically "ok", but consider future maintenance of the application by you or someone else. It's a lot easier to read the code if it's consistent and clean and you will save a lot of time later by picking and sticking to one now (preferably OOP).

提交回复
热议问题