PHP is a server-side scripting language, and the server-side belongs to the back-end. Of course, the function of PHP is not just the output page, but also the logic layer, service layer and DAO, and perhaps reading and writing files, message queues, Event mechanism and so on. Strictly speaking, PHP does much more on the back end than on the front end.
php, mysql belongs to the backend, it is equivalent to our brain, taking what we see and feeling things (data obtained at the front desk) Perform logical judgment, calculation, processing, storage, output and other operations. [Recommended tutorial:php tutorial]
The front-end here refers to applications that serve the purpose of serving visitors, and the back-end refers to management, operations, data mining and other non-visitor-oriented things. .
Because PHP is fast and easy to deploy, it has greater advantages than other languages on the front end (for example, the interface is changed every 3 months). However, PHP is interpreted after all, so it is stable (referring to small changes in demand). , rarely recompiled) and complex (instruction-intensive), the operating efficiency is low and at a disadvantage compared to compiled languages.
To sum up: PHP belongs to the backend.In fact, it doesn’t make much sense when we say whether PHP is a front-end or a back-end. As far as the lamp architecture is concerned, PHP can be regarded as a component of the entire architecture, a web system, and its front-end and back-end divisions should be based on whether to interact with the database. To divide, the simplest one is, (html, css, javascript) belongs to the front desk, html controls the front desk text format, css is like a girl putting on makeup, beautifying the page, and javascript is to realize the interaction between the front desk page and the customer.
The above is the detailed content of Is php front-end or back-end?. For more information, please follow other related articles on the PHP Chinese website!