« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 45 for Uncaught (0.004 sec.)
parallel\Future::value — Resolution | PHP 8.3 13367
parallel\Future::value (0.8.0) parallel\Future::value — Resolution 説明 public function parallel\Future::value (): mixed Shall return (and if necessary wait for) return from task Exceptions 警告 Shall throw parallel\Future\Error if waiting ... uture\Error\Cancelled if task was cancelled. 警告 Shall throw parallel\Future\Error\Foreign if task raised an unrecognized uncaught exception. 警告 Shall rethrow Throwable uncaught in task 他のマニュアルの関連ページ Python asyncio-extending Python asynci ...
https://man.mtool.work/php/8.3/parallel-future.value.html
throw | PHP 8.3 11193
throw (PHP 5, PHP 7, PHP 8) throw キーワードは式であり、式を書ける場所ならどこでも使えます。 引数として Throwable オブジェクトを受け取ります。 警告 PHP 8.0.0 より前のバージョンでは、 throw キーワードは式ではなく文でした。 Throwable ではない ... ではないオブジェクトをスローする <?php throw new class {}; 上の例の出力は、 たとえば以下のようになります。 PHP Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in Command line code:1 Stack trace: #0 {main} throw を使うと通 ... execution' ); echo "After exception\n" ; 上の例の出力は、 たとえば以下のようになります。 Before exception PHP Fatal error: Uncaught Exception: Stop execution in Command line code:2 Stack trace: #0 {main} thrown in Command line code on line 2 例3 関数内で ... ); echo "After exception\n" ; } foo (); 上の例の出力は、 たとえば以下のようになります。 Before exception PHP Fatal error: Uncaught Exception: Stop execution in Command line code:3 Stack trace: #0 Command line code(7): foo() #1 {main} thrown in Command l ...
https://man.mtool.work/php/8.3/control-structures.throw.html
型宣言 | PHP 8.3 11193
型宣言 関数のパラメータや戻り値、 クラスのプロパティ (PHP 7.4.0 以降)、クラス定数 (PHP 8.3.0 以降) に対して型を宣言することができます。 これによって、その値がコール時に特定の型であることを保証できます。 その型でない場合は、 TypeError がスロ ... preted as a class name. Did you mean "bool"? Write "\boolean" to suppress this warning in /in/9YrUX on line 2 Fatal error: Uncaught TypeError: test(): Argument #1 ($param) must be of type boolean, bool given, called in - on line 3 and defined in -:2 Stac ... az ( $var ); var_dump ( $var ); array_baz ( $var ); ?> 上の例の出力は、 たとえば以下のようになります。 int(1) Fatal error: Uncaught TypeError: array_baz(): Argument #1 ($param) must be of type array, int given, called in - on line 9 and defined in -:2 St ... ( $c ). "\n" ; } f (new C ); f (new D ); f (new E ); ?> 上の例の PHP 8 での出力は、このようになります。: C D Fatal error: Uncaught TypeError: f(): Argument #1 ($c) must be of type C, E given, called in /in/gLonb on line 14 and defined in /in/gLonb:8 Sta ...
https://man.mtool.work/php/8.3/language.types.declarations.html
V8Js::__construct — 新しい V8Js | PHP 8.3 10917
V8Js::__construct (PECL v8js >= 0.1.0) V8Js::__construct — 新しい V8Js オブジェクトを作成する 説明 public function V8Js::__construct ( string $object_name = "PHP" , array $variables = array() , array $extensions = array() , bool $report_uncaught ... ありません。 また、ある登録が別の拡張に依存している場合も、依存している拡張は省略できます。デフォルトは空の配列です。 report_uncaught_exceptions キャッチできなかった JavaScript の例外をその場ですぐに報告するかどうかを制御します。 デフォルトは true です。 f ...
https://man.mtool.work/php/8.3/v8js.construct.html
assert — アサーションの値を調べる | PHP 8.3 9018
assert (PHP 4, PHP 5, PHP 7, PHP 8) assert — アサーションの値を調べる 説明 function assert ( mixed $assertion , Throwable | string | null $description = null ): bool assert() は expectation の定義を満たします。すなわち、 開発環境やテスト環境 ... ; echo 'Hi!' ; アサーションが有効になっている ( zend.assertions=1 ) 場合は、上の例の結果は次のようになります: Fatal error: Uncaught AssertionError: assert(1 > 2) in example.php:2 Stack trace: #0 example.php(2): assert(false, 'assert(1 > 2)') #1 {main} th ... be greater than two" ); echo 'Hi!' ; アサーションが有効になっている場合は、上の例の結果は次のようになります: Fatal error: Uncaught AssertionError: Expected one to be greater than two in example.php:2 Stack trace: #0 example.php(2): assert(false, 'Expect ... 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.ph ...
https://man.mtool.work/php/8.3/function.assert.html
set_exception_handler — ユーザー定義の例外ハンドラ関数を設定する | PHP 8.3 9018
set_exception_handler (PHP 5, PHP 7, PHP 8) set_exception_handler — ユーザー定義の例外ハンドラ関数を設定する 説明 function set_exception_handler ( ? callable $callback ): ? callable 例外が try/catch ブロックの中でキャッチされなかった場合の ... しないと報告されます。 例 例1 set_exception_handler() の例 <?php function exception_handler ( Throwable $exception ) { echo "Uncaught exception: " , $exception -> getMessage (), "\n" ; } set_exception_handler ( 'exception_handler' ); throw new Exception ( ... 'Uncaught Exception' ); echo "Not Executed\n" ; ?> 参考 get_exception_handler() - ユーザー定義の例外ハンドラ関数を取得する restore_e ...
https://man.mtool.work/php/8.3/function.set-exception-handler.html
Threaded::isTerminated — State Detection | PHP 8.3 9018
Threaded::isTerminated (PECL pthreads >= 2.0.0) Threaded::isTerminated — State Detection 説明 public function Threaded::isTerminated (): bool Tell if the referenced object was terminated during execution; suffered fatal errors, or threw uncaught ...
https://man.mtool.work/php/8.3/threaded.isterminated.html
LuaSandbox::setMemoryLimit — Set the memory limit for the Lua environment | PHP... 8743
LuaSandbox::setMemoryLimit (PECL luasandbox >= 1.0.0) LuaSandbox::setMemoryLimit — Set the memory limit for the Lua environment 説明 public function LuaSandbox::setMemoryLimit ( int $limit ): void Sets the memory limit for the Lua environme ... l x = "x"; while true do x = x .. x; end' )-> call (); ?> 上の例の出力は、 たとえば以下のようになります。 PHP Fatal error: Uncaught LuaSandboxMemoryError: not enough memory 参考 LuaSandbox::getMemoryUsage() - Fetch the current memory usage of the Lua env ...
https://man.mtool.work/php/8.3/luasandbox.setmemorylimit.html
BackedEnum::from — スカラー型の値を列挙型にマップする | PHP 8.3 8191
BackedEnum::from (PHP 8 >= 8.1.0) BackedEnum::from — スカラー型の値を列挙型にマップする 説明 public static function BackedEnum::from ( int | string $value ): static from() メソッドは 文字列型や整数型の値を、存在する場合に 列挙型の case に変 ... rom ( 'H' ); var_dump ( $h ); $b = Suit :: from ( 'B' ); ?> 上の例の出力は以下となります。 enum(Suit::Hearts) Fatal error: Uncaught ValueError: "B" is not a valid backing value for enum "Suit" in /file.php:15 参考 UnitEnum::cases() - 列挙型の case 一覧を ...
https://man.mtool.work/php/8.3/backedenum.from.html
The parallel\Future class | PHP 8.3 8191
The parallel\Future class (0.8.0) Futures A Future represents the return value or uncaught exception from a task, and exposes an API for cancellation. 例1 Example showing Future as return value <?php $runtime = new \parallel\Runtime ; $futu ...
https://man.mtool.work/php/8.3/class.parallel-future.html
PREV 1 2 3 4 5 NEXT