$a = []; foreach($a as $v){ echo 222; } //不会输出222 并且不会报错 转载于:https://www.cnblogs.com/clphp/p/6957824.html