search
HomeBackend DevelopmentPHP Tutorial为什么开发人员对于PHP语言褒贬不一

PHP 语言,作为服务器端开发的脚本语言,在网站开发方面非常有名。从1995年 Rasmus Lerdorf 创建之后,W3Techs 的调查显示在已知的服务端编程语言中,PHP 占了82%。其中不乏WordPress,Facebook 这种公司。

PHP 语言,作为服务器端开发的脚本语言,在网站开发方面非常有名。从1995年 Rasmus Lerdorf 创建之后,根据 W3Techs 的调查显示在已知的服务端编程语言中,PHP 占了82%。其中不乏WordPress,Facebook 这种公司。在 PyPL(编程语言流行度排行榜)中仅次于 Java,在 Toibe 排行中名列第六。2015年会有高性能的 PHP 7 发布。

像所有的技术一样,人们对它的评价参差不齐。我们来看看为什么有的人喜欢它而有的人诅咒它。

优点一:流行,容易上手

PHP 是目前最流行的编程语言。PHP 工具厂商 Zend 科技 CEO Andi Gutmans 如是说。New Media Campaigns公司的开发工程师 Josh Lockhart 对我们讲:PHP 是最容易学习的网站开发语言。它安装在绝大多数的服务器上。由于有实时更新的文档和问答,PHP 语言相对其他语言简单易学。

优点二:网站开发职位很多

Gutmans 还说,在服务器端的网站编程中PHP会帮助你找到工作。Dice.com 一个简短的调查中显示,和 PHP 相关的职位有3366个,相比于 Java 17418个和 Perl 4300个,Python 5429个少了一些,但是比 Ruby 的2973和985个 Objective-C 职位多一些。尽管比 Ruby,Python,Go,Rust 语言略逊,但是 Lockhart 认为 PHP 仍然是使用最多的语言之一。

优点三:仍然在不断发展

PHP 在不断兼容着类似 closures 和命名空间等技术,同时兼顾性能和当下流行的框架。Gutmans 说道,接触 PHP 并不需要知道 PHP 到底提供了哪些技术,Lockhart 作为一名开发人员讲:大家讲 PHP 认为是一个面向对象的开发模型。接下来的版本是7,将要提供更高性能的应用。Lockhart 指出Facebook 也在加强 PHP,比如他们的 HHVM 虚拟机,和 Hack 编程语言。

缺点:设计缺陷,缺少关注

博 主 Eevee 说,PHP 的每个功能设计都是有问题的。他对 PHP 的看法是极其糟糕的设计。Eevee 不仅不喜欢这个语言,对其框架也不能赞同。他认为 PHP 语言不稳定,总是出现各种意外。PHP 被称作是不透明的语言,因为没有堆栈追踪,各种脆弱的输入。没有一个明确的设计哲学。早期的 PHP 受到 Perl 的影响,带有 out 参数的标准库又是有 C 语言引入,面向对象的部分又是从 C++ 和Java 学来的。

Lockhart 得知 Eeveef 反对 PHP 的言论的时候他觉得有些夸张了。尽管是 PHP 的拥护者,Lockhart对于对 PHP 的批评还是很耐心的。

  • 语言不持续化,特别在命名空间和参数顺序上。Lockhart:这些都很容易适应,不是大问题。
  • PHP 还有很多遗留下来的东西,包括全局变量,魔法引用等。 Lockhart:这些不好的实现都会在不断地被淘汰。但在淘汰之前,它让变成习惯不好的程序猿有法可施。
  • PHP 的关注度不够。Lockhart 也在不断努力提升 PHP 关注度。Lockhart:尽管断断续续,但是社区的人们仍然很关注 PHP。
  • 对一门技术的喜厌程度来自很多方面,从个人习惯到项目需求,PHP没办法做到人见人爱,但是,你一定有很多话要对PHP说,那在下面的评论出说吧

    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
    PHP and Python: Different Paradigms ExplainedPHP and Python: Different Paradigms ExplainedApr 18, 2025 am 12:26 AM

    PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

    PHP and Python: A Deep Dive into Their HistoryPHP and Python: A Deep Dive into Their HistoryApr 18, 2025 am 12:25 AM

    PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

    Choosing Between PHP and Python: A GuideChoosing Between PHP and Python: A GuideApr 18, 2025 am 12:24 AM

    PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

    PHP and Frameworks: Modernizing the LanguagePHP and Frameworks: Modernizing the LanguageApr 18, 2025 am 12:14 AM

    PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

    PHP's Impact: Web Development and BeyondPHP's Impact: Web Development and BeyondApr 18, 2025 am 12:10 AM

    PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

    How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

    PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

    How does PHP handle object cloning (clone keyword) and the __clone magic method?How does PHP handle object cloning (clone keyword) and the __clone magic method?Apr 17, 2025 am 12:24 AM

    In PHP, use the clone keyword to create a copy of the object and customize the cloning behavior through the \_\_clone magic method. 1. Use the clone keyword to make a shallow copy, cloning the object's properties but not the object's properties. 2. The \_\_clone method can deeply copy nested objects to avoid shallow copying problems. 3. Pay attention to avoid circular references and performance problems in cloning, and optimize cloning operations to improve efficiency.

    PHP vs. Python: Use Cases and ApplicationsPHP vs. Python: Use Cases and ApplicationsApr 17, 2025 am 12:23 AM

    PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

    See all articles

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    AI Hentai Generator

    AI Hentai Generator

    Generate AI Hentai for free.

    Hot Article

    R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
    1 months agoBy尊渡假赌尊渡假赌尊渡假赌
    R.E.P.O. Best Graphic Settings
    1 months agoBy尊渡假赌尊渡假赌尊渡假赌
    Will R.E.P.O. Have Crossplay?
    1 months agoBy尊渡假赌尊渡假赌尊渡假赌

    Hot Tools

    Safe Exam Browser

    Safe Exam Browser

    Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

    WebStorm Mac version

    WebStorm Mac version

    Useful JavaScript development tools

    SAP NetWeaver Server Adapter for Eclipse

    SAP NetWeaver Server Adapter for Eclipse

    Integrate Eclipse with SAP NetWeaver application server.

    MinGW - Minimalist GNU for Windows

    MinGW - Minimalist GNU for Windows

    This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

    Atom editor mac version download

    Atom editor mac version download

    The most popular open source editor