Where is the future of PHP programmers in 2017

Where is the future of PHP programmers in 2017

PHP has been in existence for more than 20 years. From the Web era to the ebb of the mobile Internet, various programming languages ​​and technologies in the Internet field are emerging in an endless stream. Node.js, GO, and Python continue to challenge the status of PHP. The promoters of these technologies are very keen to sing down PHP. Where is the future of the PHP language? How should PHP programmers deal with future changes? As a veteran Web back-end programming language, PHP has a very high global market share, second only to Java. From the data of various recruitment websites, there are many PHP development positions and the salary level is also very good. In fact, the market position of PHP in SMEs and Internet startups is higher than that of Java. Java has greater advantages in super-large enterprises, the traditional software industry, and the financial sector. At present, languages ​​such as Node.js, GO, Python, Ruby are still hard to match PHP and Java. The reason why the PHP language has today's status is due to the fact that PHP language designers have always followed pragmatism and hide the complexity of the technology at the bottom. The PHP language is simple to get started, easy to master, and the program is robust. It is not prone to complex problems like Java, C++ and other languages, such as memory leaks and Crash, and it is relatively easy to track and debug. The official 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, etc., eliminating the need for developers to look for libraries everywhere. upset. The PHP documentation is great, with detailed descriptions and usage examples for each function. Third-party libraries and tools, codes, and projects are also very rich. Developers can quickly and efficiently use PHP to write and develop all kinds of software. So far, there is still no programming language that is simpler and easier to use than PHP. Therefore, the prospect of PHP is still very broad. Instead of entangled in the choice of programming language, it is better to learn and use PHP in depth. As a senior PHP developer, I would like to give you ten suggestions for the future of PHP programs technically. 1. Composer The first point is to mention Composer. Since the advent of Composer, the dependency management of PHP can become very simple. The program relies on some class libraries and frameworks, which can be imported directly using Composer, and the dependent packages can be installed by using composer update. Solved various problems of loading external libraries in the past. Composer also has domestic mirrors, which are very fast. At present, most of the PHP open source projects provide Composer support. It is recommended that you use Composer in your projects to solve the problem of PHP code package management, and do not use the original method of downloading source code and manual include. 2. PHP7 The PHP7 version has made a lot of changes to the Zend engine, which greatly improves the performance of the PHP language. Using PHP7 can instantly double the performance of your program. Even heavyweight software such as WordPress can have thousands of QPS running on PHP7, which is equivalent to a server that can handle 80 million requests per day. Use PHP7, do a good job of MySQL optimization, and use Memcache and Redis for acceleration. This set of technical architecture can fully cope with a fairly large-scale system. Except for some platforms with hundreds of millions of users, the general-scale system is completely stress-free. 3. PSR PSR is a PHP language development specification formulated by the http://www.php-fig.org/organization, which stipulates many rules, such as namespace, class name specification, coding style standard, Autoload, public interface, etc. It has now become the de facto standard in the PHP technology community. Many well-known PHP frameworks and libraries have complied with the PSR specification. PHP developers should learn to master the PSR specification, and should try their best to follow the PSR specification when developing programs. 4. Is Swoole's 2017 PHP still limited to web sites? No, if you don’t know Swoole yet, hurry up and find out. Swoole's slogan is to redefine the PHP language. Swoole is an asynchronous and parallel communication engine that runs as an extension of PHP. Node. There are asynchronous callback Swoole of js, and Swoole of Go language, which completely subverts the understanding of PHP. Use Swoole PHP to realize the resident server program, and realize the programming and development of TCP and UDP asynchronous network communication. In the past, PHP could only be used as a Web site. Now, using Swoole, you can do communication services that can only be realized by Java and C++, such as WebSocket communication, chat, push server, RPC remote call service, gateway, proxy, game server, etc. If you want to use PHP to do something outside of the Web system, Swoole is the best choice. 5. Laravel is the hottest PHP framework in recent years. The official website claims to be a framework designed for web artists, which shows how elegant this framework is. Laravel provides rich functional modules, simple API design, and strong expressiveness. And its community is very active, there are many code contributors, there are many third-party plug-ins, and the ecosystem is quite prosperous. Laravel uses a lot of symfony2 components in the bottom layer, and realizes dependency management through composer. If you are still entangled in what PHP framework to use, it is better to choose Laravel. The command line tool provided by Laravel is based on symfony.console, which is powerful and integrates various project management and automatic code generation functions. 6. After Phar PHP5.3, a Java-like jar package named phar is supported. Used to package multiple PHP files into one file. This feature allows PHP to implement application packaging and componentization as easily as Java. An application can be marked as a Phar package and run directly in PHP-FPM. With Swoole, you can execute php server.phar on the command line to start the server with one click. PHP code packages can be packaged into components with Phar, and placed in Swoole's server container to load and execute. 7. Any technology of C/C++/GO has advantages and disadvantages. As a dynamic scripting language, PHP has the advantages of convenient development and high efficiency. The disadvantage is poor performance. It is dozens or even hundreds of times worse than C and C++ in intensive computing scenarios. In addition, PHP cannot directly manipulate the bottom layer, and needs to rely on extension libraries to provide API implementation. PHP programmers can learn a statically compiled language as a supplement to achieve dynamic and static complementarity. C/C++/Go are both good choices. Moreover, the programming experience of static languages ​​is completely different from that of dynamic languages, and the learning process can give you a greater improvement. After mastering the C/C++ language, you can also read the source code of open source software such as PHP, Swoole, Nginx, Redis, and Linux kernel to understand its underlying operating principles. Now the latest version of Swoole provides C++ extension module support, encapsulates Zend API, and it is very easy to operate PHP with C++, and you can use C++ to implement PHP extension functions and classes. 8. HTML5 is a new-generation standard for the front end of the Web. The future of HTML5 is very broad and the market demand is very large. From PC websites, B/S enterprise software, mobile web pages, and APPs, these fields are all embracing HTML5. Only if you master HTML5 can you survive the next wave of Internet technology. 9. In addition to writing background programs, Vue.js PHP programmers also have a large part of their work in the presentation layer, dealing with the front end of the browser. Are you still using jQuery to manipulate the DOM for interface rendering in 2017? It's completely out. Now Vue.js can easily realize the binding of data and DOM elements. After requesting the back-end interface to return data through Ajax, update the front-end data to automatically realize the interface rendering. It will be too late if you don't learn Vue in 2017. If you not only want to write Web programs, but also want to take into account platforms such as Android, IOS, and PC clients, React Native is a good choice. 10. Deep learning/artificial intelligence The future of the Internet belongs to artificial intelligence. If you do not understand the concepts of machine learning, deep learning, and artificial intelligence, then you need to learn and understand as soon as possible. Now Internet giants are deploying artificial intelligence, including Google, Facebook, Microsoft, Amazon and domestic Baidu. Although it is still in the stage of scientific research, artificial intelligence will be applied to various fields of the Internet in the future, including autonomous driving, big data analysis, online games, image recognition, language processing, etc. Of course, ordinary engineers may not be able to participate in artificial intelligence products, but they should at least understand the basic concepts and principles of deep learning/artificial intelligence.

Reference: https://cloud.tencent.com/developer/article/1055524 Where is the future of PHP programmers in 2017-Cloud + Community-Tencent Cloud