Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the most easily forgotten knowledge points in PHP?

Shulou Source: shulou.com Published: 2022-06-03 05:53:24 11月17日 Update

Xiaobian to share with you the most easily forgotten knowledge points in PHP, I believe most people still do not know how to share this article for your reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!

1. Definition of constants:

The copy code is as follows:

Difference between require and require_once:

The former includes files when it encounters them, while the latter determines whether they have already been included, and if they have, they no longer include files. One can save resources, two can avoid duplication of definition errors.

Difference between include and include_once:

Both functions and functions can be contained in one page, the former can contain multiple times, the latter only once.

Difference between include and require (both include_once and require_once)

Same: can introduce other pages

Different: include continues execution if an error occurs, require terminates the program if an error occurs.

Conclusion: Basically use require_once when doing projects and write it at the beginning of PHP.

5. Variables defined in PHP are case-sensitive, while functions are case-insensitive.

The copy code is as follows:

The above is "What are the most easily forgotten knowledge points in PHP?" All the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Tags: Code size knowledge article error page output knowledge point content function variable file time different same not much function writing function at the same time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Docker Shulou Information MySQL Linux