PHP “or” Syntax

前端 未结 8 2155
臣服心动
臣服心动 2020-12-14 06:29

I\'ve seen this a lot: $fp = fopen($filepath, \"w\") or die(); But I can\'t seem to find any real documentation on this \"or\" syntax. It\'s obvious enough what

8条回答
  •  庸人自扰
    2020-12-14 07:13

    It can be used just like you'd use || as a logical OR http://php.net/manual/en/language.operators.logical.php

提交回复
热议问题