Can php make games?

(*-*)浩
Release: 2023-02-24 15:30:02
Original
4611 people have browsed it

Can PHP make games? PHP is a popular computer language now, but many netizens are asking whether PHP can develop games. After all, making games is the most profitable now. Here is an introduction to how to develop games in PHP!

Can php make games?

Let’s talk about why PHP is not suitable for game backends. The following points (summarized by others, please don’t spray):

Native PHP does not support multi-threading. The native PHP language has almost no corresponding support solution for multi-threading. Although the third-party library Swoole can be installed to implement it, the system resources are high, so it is not as good as directly using C or JAVA; (Recommended learning: PHP Programming From entry to master)

cannot be resident in memory. PHP, as a web page script, almost does not involve resident memory. Although you can use set_time_limit(0) and ignore_user_abort() to keep the script running in the background, its reliability is not reached at all;

Cannot run as a background service. php is based on server software and cannot run independently;

PHP has poor high concurrency support.

So, to put it bluntly, PHP is relatively lazy. Once the user requests it, it responds once and does not actively run in the background. So it is not suitable as a game service backend.

Whether there is a future has something to do with people and has nothing to do with language. Not to mention PHP, if you learn any language to the extreme, you will have a bright future. In fact, you don’t need to reach the top level. Even if you are in the top 30% of the industry, your income will definitely be higher than that of most ordinary people. And all this does not require how high your background is, nor how rich your father is, it only requires you to be smart and talented.

The above is the detailed content of Can php make games?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template