In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "what are the advantages of PHP". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's ideas to study and learn "what are the advantages of PHP"?
PHP language
PHP5.0 (released in 2004) brings a very practical object model. Wait, I'm talking about something released eight years ago. Fast forward to the current PHP5.4, the latest version of PHP, with what you've always dreamed of for the modern web language: yes, PHP supports namespaces (namespaces); yes, PHP supports closures (closure); and yes, PHP supports traits.
Although it takes some time, PHP5.4 brings some syntax sugars to make the overall experience better than ever: yes, PHP supports defining arrays with []; yes, PHP supports newly created objects to call functions like (new Foo ())-> bar (); and yes, PHP supports arrays to get elements like this: $foo- > bar () [1].
PHP even learned from its own mistakes: register_globals and magic_quotes were completely deleted.
PHP has a built-in web server to facilitate local testing, which can be started at microsecond speeds.
The next challenge: how do we update our online tutorials on PHP? What is the best technology to support WebSocket in PHP programs?
PHP ecosystem
It's good to have a good language, but it's better to have a good ecosystem. The PHP ecosystem has evolved a lot in the past few years.
Git
I don't want to talk too much about Git. Git is used everywhere, and PHP quickly hugs Git. Almost all PHP class libraries, frameworks, and products use Git, including PHP itself.
Composer
Two years ago, I wanted to get rid of my ugly PEAR code from hack in symfony 1 to support plug-ins. I want to replace it with something that manages project dependencies, rather than an overall installation like PEAR, so I try to find the best algorithm to manage software dependencies. I tried almost everything: from Perl to Ruby, from Debian to Redhat. The result did not satisfy me, only my own solution happened to work. Of course it's just my experience. Just talk about it. Then I stumbled upon ZYpp, and this is it. ZYpp uses solutions to Boolean satisfiability problems to manage dependencies. Thanks to the hard work of Nils Adermann and Jordi Boggiano, PHP now has a good tool for managing dependencies-Composer.
Yes, PHP has better dependency management tools than other languages.
Thanks to Git,Composer and PHP's built-in web server, it is easier to download / test / install a PHP project.
Want to test Symfony (using PHP5.4)?
The copy code is as follows:
$composer.phar create-project symfony/framework-standard-edition
$cd framework-standard-edition
$. / app/console server:run
Want to test Silex?
The copy code is as follows:
$composer.phar create-project fabpot/silex-skeleton
$cd silex-skeleton
$php-S localhost:8888-t web/
Still don't know Composer? You should know about it.
Browse to Packagist, the main Composer repository, which already has more than 1900 packages and has been installed millions of times in less than three months.
The next challenge: built-in Composer in the next version of PHP?
Cooperation
Community cooperation is the focus of this article, and it is also what I am most proud of. We're starting to see better collaboration in PHP projects, even big ones, so big that you can ignore other projects.
PhpBB,Drupal,ez Publish,Symfony, and many other projects (such as phpDocumentor, PHPUnit, Behat, Zikula, Propel, Doctrine, Midgard, etc.) are sharing code. Yes, they are competitors, but they all understand that it is important for them to cooperate with each other. Composer can well promote this kind of cooperation.
The next challenge: persuade more projects to join this trend.
Thank you for your reading, the above is the content of "what are the advantages of PHP". After the study of this article, I believe you have a deeper understanding of what the advantages of PHP are, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.