Where is the limit of PHP?

Source: Internet
Author: User
0 reply content: implements the most concise web program with CPHP, and uses the Fat-Free Framework

$f3=require('path/to/base.php');$f3->route('GET /',    function() {        echo 'Hello, world!';    });$f3->run();
When you need to consider the limit of a language, you usually use it in an unsuitable place. There is a management saying that there are no fools in the world, and there are only smart people in the wrong position ~ One problem encountered in the past two days is the asynchronous processing of php. php itself does not have an asynchronous processing mechanism. If you want to use it, you can only simulate it yourself, and debugging is very troublesome.
There are several solutions. The first is to call the script for processing, and the second is to simulate a browser to open a single page process.

In fact, @ harry is not completely correct. Now the web is facing more and more situations. Since we have chosen a language, we must face the weakness of this language, I hope that the next php version can solve the asynchronous problem. Although it is unlikely that language attacks will be the most boring, it is usually discussed most recently. Language is just a tool. When we use another tool, we need to consider how efficient it is to use, how long it will take for development, maintenance, and recruitment costs. Select a suitable one. From the number of practitioners, technical and document maturity, development efficiency, PHP is currently the mainstream.

There are tens of millions of weapons. What weapons are used does not mean that they are masters, but depends on your basic skills and the internal force accumulated by long-term training. When you need to process long-time business and concurrent business (multi-process, multi-thread), you need to consider using other languages. 1. Large-scale Computation
2. asynchronous processing/Multithreading
3. Schedule Tasks
However, this can be overcome ~~~ If you really need to solve the above problems, PHP won't take the backend seriously. I agree with 1L. Good Programming and work habits are the same. To learn from each other, there is no best language, although we can try to use php to make a variety of functions, but in fact, it may be more efficient and simple to do this in another language, so, more efficient problem solving is the most important. php has its own advantages and disadvantages. I personally think that his execution is definitely very fast, but the fast cost is optimization by programmers, because he is only a "one-character translation", many people write different results for the same function, but because he is too fast, these tiny differences are hard to see if they are not for a large amount of access or data, so their bottleneck should be in the database. It is more important to set up the database more efficiently, however, this disadvantage has nothing to do with php itself. Because php is not actually a language, but a solution to the problem. More like a plug-in! I personally think that php processing speed is related to its own mechanism and dynamic compilation. In terms of limit, processing complicated large data volumes is considered one aspect! Therefore, php is very suitable for web programming! Php claims that the efficiency is the best, but in the actual production process, the efficiency increases with the complexity of php code, and the speed is reduced in geometric order. Where is the height?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.