PHP “or” Syntax

前端 未结 8 2129
臣服心动
臣服心动 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:17

    It's a logical operator and can be used in any logical expression.

    http://php.net/manual/en/language.operators.logical.php

提交回复
热议问题