Home >Backend Development >PHP Tutorial >Several special operators in PHP
// 错误屏蔽 ( @ ) $err2 = @(5 / 0); // 执行(`.....`) // 反引号可以把反引号之间的字符串当做shell命令执行,并返回输出结果 // 反引号运算符“`”的效果与函数 shell_exec() 相同 $listing = `ipconfig`; echo $listing; // 类型 (instanceof) // 测试一个变量是否为给定类的实例化的对象,或是一个接口的实现 class AA{} $a = new AA; if($a instanceof AA){ echo '$a is Class "AA"'; } if($a instanceof BB){ echo '$a is Class "BB"'; }
The above has introduced several special operators in PHP, including related content. I hope it will be helpful to friends who are interested in PHP tutorials.