What is the reason why php equals judgment and writing in reverse?

WBOY
Release: 2016-08-26 10:12:56
Original
1050 people have browsed it

When I looked at thinkPHP source code recently, I saw that some judgment methods are written in reverse, for example:

<code>if(''==$name) { // 获取全部变量
        $data       =   $input;
        $filters    =   isset($filter)?$filter:C('DEFAULT_FILTER');
        if($filters) {
            if(is_string($filters)){
                $filters    =   explode(',',$filters);
            }
            foreach($filters as $filter){
                $data   =   array_map_recursive($filter,$data); // 参数过滤
            }
        }
    }</code>
Copy after login

Xiaobai, please explain why it is ''==$name instead of $name ==''?
What is the difference between the two?
Thank you!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template