Modern PHP programming

Source: Internet
Author: User

  • Automatic loading of __autolaod and Spl_autoload_register ()

    Automatic loading means that if you can't find a way to handle a class, see this article, which can be said that Spl_autoload_register is a more advanced, more flexible way to load.

  • Name space

    In C + +, namespaces were introduced early to resolve naming conflicts, and as PHP's engineering volume increased, the namespace mechanism was introduced in php5.3. With auto-loading and namespaces, the popular composer Package manager for the PHP community is now available on this basis. I have to say that composer is a very good package manager, much better than Nodejs's NPM, and Python's PIP. Refer to this article for a namespace.

  • Interface

    Contract-oriented programming
  • Trait

    Common code snippets, combinatorial patterns, combinations better than inherited ideas

  • Delay binding

    The difference between static and self
  • Iterators and generators

  • Anonymous functions and closures

  • Log

    Recommended use of Monolog with Rsyslog, or third-party log services

  • Copying copy on Write

    $foo['love']1;$bar  = &$foo['love'];$tipi$foo;$tipi['love']'2';echo$foo['love'];//输出2

    $bar the reference operation of the variable, the $foo[' love '] pollution becomes a reference, thus zend the replication of the memory without the modification of $tipi[' love ').

  • Variable parameters
  • PHP Monitoring Performance Tuning APM
  • [] Reflection

  • PSR PHP Industry Specification
  • Experience with PHP optimization
  • PHP-Functional programming
  • [] Method overloading

Modern PHP programming

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.