Results of 1 - 1 of about 1 for ArithmeticAssertionError (0.001 sec.)
- assert — アサーションの値を調べる | PHP 8.3 9414
- assert (PHP 4, PHP 5, PHP 7, PHP 8) assert — アサーションの値を調べる 説明 function assert ( mixed $assertion , Throwable | string | null $description = null ): bool assert() は expectation の定義を満たします。すなわち、 開発環境やテスト環境
... e 2 アサーションが無効になっている場合は、上の例の結果は次のようになります: Hi! 例3 カスタムの例外クラスを使う <?php class ArithmeticAssertionError extends AssertionError {} assert ( 1 > 2 , new ArithmeticAssertionError ( "Expected one to be greater than two" )); echo ' ... Hi!' ; アサーションが有効になっている場合は、上の例の結果は次のようになります: Fatal error: Uncaught ArithmeticAssertionError: Expected one to be greater than two in example.php:4 Stack trace: #0 {main} thrown in example.php on line 4 アサーションが ...
-
https://man.mtool.work/php/8.3/function.assert.html
PREV
1
NEXT