Author | program Engineer
Edit |moomoo
PHP from the birth to now has more than 20 years of history, from the Web era rise to the mobile Internet ebb, the Internet domain of various programming languages and technologies, Node.js, go and Python constantly challenge the status of PHP. The driving of these technologies is very keen to sing the future of php,php language. How PHP programmers respond to future changes.
As a veteran web backend programming language, PHP has a very high market share in the world, second only to Java, from the various recruitment site data to see the PHP development of a lot of posts, the pay level is also very good. Actual in small and medium-sized enterprises, internet start-up company PHP market position is higher than the java. Java in the Super large enterprises, the traditional software industry, the financial sector has a greater advantage. For now, languages like Node.js, go, Python, Ruby and so on are hard to reach with PHP and Java.
PHP language has the status of today, thanks to the PHP language designers have been adhering to the pragmatism, the complexity of the technology hidden in the bottom. PHP language Introduction is simple, easy to master, the program is robust, not easy to appear like Java, C + + and other languages such as complex problems, such as memory leaks and Crash, tracking debugging relatively easy a lot.
The standard library provided by PHP is very powerful, various functions can be found in the official standard library, including MySQL, Memcache, Redis, GD Graphics library, CURL, XML, JSON and so on, eliminates the developers everywhere to find a library of trouble. PHP's documentation is great, with detailed descriptions and examples of each function. Third-party libraries and tools, code, projects are also rich. Developers can quickly and efficiently use PHP to write and develop various types of software.
There are no simpler programming languages available to date than PHP. So the outlook for PHP is still very broad, rather than the choice of the programming language, to learn how to use PHP well in depth.
As a senior PHP developer, in the technical to give you some of the future of PHP program suggestions, I hope to help.
1Composer
The 1th is to mention composer, since the advent of composer, PHP's dependency management can become very simple. The program relies on a number of class libraries and frameworks that can be introduced directly using composer to install dependent packages by using composer update. Solves the challenges of loading external libraries in the past.
Composer also has a domestic mirror, very fast. Now the vast majority of PHP open source projects have provided composer support, we recommend that the project to enable composer to solve the problem of PHP code package management, do not use the download source, manual include the original method.
2PHP7
PHP7 version of the Zend engine made a lot of changes, greatly improve the performance of PHP language, using PHP7 can make your program performance instantly doubled. Even the heavyweight software, such as WordPress, can have thousands of QPS in PHP7, equivalent to a single server that can handle requests 80 million times a day.
Using PHP7, do a good job of MySQL optimization, use memcache and Redis to accelerate, this technical framework can deal with quite large-scale system completely. In addition to some billion-tier users of the platform, the general size of the system is completely free of pressure.
3PSR
PSR is the PHP language development specification developed by Phpframework Interop Group, which has agreed on many rules, such as namespaces, class name specification, coding style Standard, autoload, public interface, etc. is now the de facto standard for the PHP technology community. Many well-known PHP frameworks and class libraries have complied with the PSR specification.
PHP developers should learn to master the PSR specification and should follow the PSR specification as far as possible in developing the program.
4swoole
2017 PHP is also limited to doing web sites. No, if you don't know swoole, get to know it. Swoole's slogan is to redefine the PHP language, Swoole is an asynchronous parallel communication engine that runs as an extension of PHP.
Node.js's asynchronous callback Swoole, the go language's coprocessor swoole, completely subverts the knowledge of PHP. Using Swoole PHP can implement the server program of resident memory, which can realize the programming development of TCP and UDP asynchronous network communication.
In the past PHP can only do a Web site, now use Swoole can do Java, C + + to achieve communication services, such as WebSocket even if the communication, chat, push server, RPC Remote Call services, gateways, agents, game servers and so on. If you want to do something outside of the web system with PHP, Swoole is the best choice.
5Laravel
The most fiery PHP framework in recent years, the official website boasts a framework designed for web artists, showing how elegant the framework is. Laravel provides a wealth of functional modules, concise API design, strong expression. And its community is very active, the number of code contributors, a number of Third-party plug-ins, the ecosystem is quite prosperous.
The Laravel base uses a number of SYMFONY2 components to achieve dependency management through composer. If you're still struggling with what PHP framework, choose Laravel. Laravel provides command-line tools based on symfony.console implementation, powerful, integrated various project management, automatic generation of code functions.
6Phar
A Java-like jar package, named Phar, is supported after PHP5.3. Use to package multiple PHP files into a single file. This feature makes PHP as easy as Java to implement application packaging and assembly. An application can be typed into a Phar package and run directly into the PHP-FPM.
With Swoole, you can execute PHP server.phar one-click Boot server at the command line. The code package for PHP can be packaged into components using Phar and placed in the Swoole server container to load execution.
ML & AI
Long press, identify two-dimensional code, add attention