Home  >  Article  >  Backend Development  >  Comparison between java and PHP

Comparison between java and PHP

巴扎黑
巴扎黑Original
2016-11-11 17:47:532267browse

Choose java or PHP? Learn java or learn PHP? Is java or PHP better? Is java more powerful or PHP more powerful? The language dispute has never stopped. I don’t want to participate in the dispute. I just want to make a comprehensive analysis of the two from various angles and the actual situation I know. I hope it can be a reference for friends who are about to enter the industry.

1. Technical comparison between Java and PHP: Java is a pure object-oriented development with powerful functions and many branches. There is no software that Java cannot do. C/S or B/S. Functionally speaking, no language can compare with Java. But its advantages are also its disadvantages. Please refer to point 6 for details. PHP is a rising star, absorbing the advantages of languages ​​​​such as Java, C and Perl, and focusing on the Internet field. PHP has unique advantages in the WEB field, and no language can compare with it in the WEB field. Comparing the two, Java basically wins. But in fact, there is not much comparability, and the areas of focus are different. Simply taking the WEB that can do both, PHP wins completely.

2. Comparison of market shares between java and php: The java language is considered old and has developed for many years. It occupies a place in both the C/S field and the B/S field, especially in the telecommunications and banking industries. However, with the changes in social needs and the focus on other languages, the Java market is being eroded little by little. The WEB field is almost dominated by PHP, the embedded field is almost dominated by C++, and the client field is almost dominated by the C language. If it weren't for the emergence of Android, the fate of Java would be hard to say. The huge Java empire he accumulated before will not collapse all at once, there must be a process. So you don't need to worry about the future when studying now. What you need to worry about when studying now is the Javaers who have emerged in large numbers in the past ten years and the large number of peers who are entering the Java camp. The market description of PHP is relatively simple, because we only need to look at one field, and that is the web field. The market of php in the WEB field exceeds 80%, and the rest is such as java-JSP, asp, C#, .NET, python, ruby, etc. 395 of the top 500 websites use PHP. Facebook and Sina Weibo, the two largest websites in the world, all use PHP. Comparing the two, they are evenly matched.

3. Comparison of the development space of Java and PHP. Android has strong momentum, but the number of installed apps on mobile phones is limited and promotion is difficult. This is also the biggest challenge facing apps. Fortunately, Android can only use JAVA, and other than that it is HTML5. China's population accounts for 19.7% of the global population, Chinese netizens account for 22.4% of the world's netizens, and the number of Chinese websites accounts for 0.5% of the world's websites. The potential for website development is huge; the contribution of the Internet to GDP in developed countries can reach 20%, and the Chinese Internet has contributed to The impact on GDP is only 3%. It can be said that the development space of the Internet is huge, and the Internet cannot be separated from WEB, and WEB cannot be separated from PHP. Comparing the two, I personally feel that PHP has more obvious advantages.

4. Salary comparison between Java and PHP Salary is determined by supply and demand. If there is a lack of talent, the salary will naturally be high. If the talent is saturated, the salary will naturally not be high. Since Java is basically a course offered in universities, many people naturally learn JAVA when they want to work in the software industry. Coupled with the popularity of Java in the past 10 years and the emergence of talents in large numbers, the entire Java industry is in a state of oversupply. Nanjing area: In a Java training class with 30 people, almost 10 people finally couldn't find their ideal jobs and changed careers. The minimum salary was even only more than 1,000 yuan, but some people were willing to work. Of course, if you learn Java well, a salary of more than 4,000 is quite a lot. PHP is completely driven by the market. The difficulty is that many people do not understand PHP and have no way to learn about it. The fundamental reason is that universities do not have this course. As far as I know, among the 100 universities in Nanjing, only Xiaozhuang College offers PHP courses, and Not as a major. Universities are not clear about the market demand for PHP, and they are more willing to promote Java that conforms to academic characteristics. ​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​… Generally, the starting salary is not less than 3,000 yuan. The highest price in Nanjing has already exceeded 4,500 yuan. The starting salary in Beijing, Shanghai and Guangzhou has exceeded 6,000 yuan. Comparing the two: except that Java jobs are difficult to find, but as long as you find a job, the high-end line is almost the same, and the low-end line JAVA is obviously at a disadvantage.

5. Comparison of salary increase speeds between Java and PHP: Java is recognized as difficult to get started. It takes at least 1-2 years to really get started. During this period, it is at the apprentice level and the salary increase is limited. There will be a big increase in 2 years, and basically there is no problem in getting 6-7 thousand. PHP is recognized as simple and easy to get started with. You can get a salary increase after basically passing the probation period. PHPers normally get a salary increase every six months. The range in the first 3 years is not bad, 5-6 thousand a year and 7-8 thousand in 2 years. thousand. There are many people who can make more than 10,000 yuan in three years. Comparing the two: In fact, PHP has obvious advantages in the front end, and the two areas in the back end are equal. It is not like many people say that PHP is difficult to grow in the future. PHP lacks people, but it also lacks experienced people. Java is not as high-paying as many people boast, and the polarization is serious. In fact, it is normal. The more difficult the language, the more serious the polarization.

6. Bottlenecks in the development of Java and PHP: The JavaEE system once dominated enterprise-level software development for decades, and talents emerged in large numbers during the decade, but the Java language itself is increasingly showing a bloated and fragmented trend. Using Java is an expensive choice. Complex requirements design, slow project progress, expensive application servers and difficulty in maintenance make Java a language above the temple. The split of versions also makes the so-called cross-platform feature an empty talk. The characteristics of Java make it unsuitable for Internet companies whose business changes rapidly with the market. The WEB field is almost dominated by PHP, the embedded field is almost dominated by C++, and the client field is almost dominated by C language. If it were not for the emergence of Android , the fate of java is really hard to say. The development of large and medium-sized systems in PHP is convenient and fast, which is incomparable with Java and ASP.NET. In addition, PHP has many powerful frameworks such as yaf, yii, ci, etc. For the development of small and medium-sized general systems, thinkphp is enough. Kill the three major ssh frameworks of java. Due to its simplicity and rapid development, PHP also makes it difficult to develop complex applications. The so-called success is also a failure, and because PHP focuses on the application level, development basically does not need to consider the underlying things, resulting in rapid development and learning. Simple; but it also makes it easier to encounter bottlenecks when learning PHP for a period of time. PHP added more powerful extensions after version 5.3. Through PHP extensions, functions that cannot be achieved by PHP itself can be realized. Therefore, if PHP development encounters such a bottleneck, you can consider extending it to solve it. Facebook and weibo.com are using extension functions extensively to deal with one problem after another. Hui Xinchen, architect of Sina Weibo and chief PHP technical consultant, has been focusing on the research and sharing of the underlying principles of PHP. Extensions are what he considers the greatest thing about PHP.

7. Comparison of the number of positions in Java and PHP: The following data comes from Baidu statistics in early September 2014: In early September 2014, the number of Java recruitment positions nationwide was 82,703.

Number of java recruitment positions nationwide

​​​​​In early September 2014, the number of PHP recruitment positions nationwide was 47,263.

The number of PHP recruitment positions nationwide

The number of java positions is almost less than twice the number of PHP positions. But it is worth pondering that the number of Java talents is more than 100 times the number of PHP talents.

8. Comparison of learning costs between Java and PHP: Learning Java is generally recognized as difficult. Hard to get started with, hard to understand. The time cost of self-study is 12 months, the success rate of self-study is less than 10%, and the cost of training time is also nearly 6 months. The average cost of training is approximately RMB 15,000. The time cost to become an expert is 2 years. The time cost to become a master is generally more than 5 years. PHP learning is recognized as the easiest language. Interpreted language, no compilation required. The self-study time cost is 6 months, the self-study success rate is 20%, and the training time cost is 3 months. The average cost of training is about 8,000 yuan. The time cost to become an expert is 1 year. The time cost to become a master is generally more than 3 years. Comparing the two, the school cost of Java is significantly higher than that of PHP.

To sum up: Java and PHP each have their own advantages, and they may not be finished by tomorrow morning. What I want to say is that it is OK to learn either one. If you want to learn Java, work in the Android industry; if you want to work in the WEB field, learn PHP. Because of the difficulty of learning Java, students who have no foundation or poor foundation should choose carefully. For students with zero foundation, PHP may be more suitable.


Statement:
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