Home  >  Article  >  Backend Development  >  PHP is difficult to understand

PHP is difficult to understand

WBOY
WBOYOriginal
2016-08-08 09:24:41976browse

PHP version: PHP5 >= PHP5.2.0
Namespace is a way of encapsulating things,
Use namespace: relative file path, current working path relative to script path;
: relative subdirectory path, current working path relative to subdirectory path ;
: Jedi path: namespacedirectorytofile

empty() function: Determine whether the variable is considered empty: the condition for determining it to be empty is that the variable does not exist or the value of the variable is false;
The expression used is !isset($var) || $var==false;
Before PHP5.5, only variable names were supported, expressions were not supported,
Therefore empty(trim(var)) is grammatically wrong;
isset($var): Determination Whether the variable is set and the set value is not NULL;

The above has introduced the difficult aspects of PHP, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

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
Previous article:PHP---common codesNext article:PHP---common codes