die()

関数

 状態:  閲覧数:6,799  投稿日:2010-05-12  更新日:  
PHPスクリプトの実行を終了



・引数で指定したステータスが文字列の場合は、終了する前に 同文字列を出力



例)die()関数に、文字列のステータスを指定して終了
 
<?php
die( "PHPスクリプト終了!!" );
?>

▼結果
  /demo/die1.html


「仮引数」「実引数」

シリアライズ(シリアル化)

コメント投稿(ログインが必要)



類似度ページランキング
順位 ページタイトル抜粋
1 die() 100
2 mixed 60
3 include 50
4 isset 40
5 var_dump() 40
6 session_start() 40
7 __get()メソッド 38
8 Cookie 36
9 Xdebug 36
10 parse_url( ) 35
11 include_path 35
12 session_save_path() 33
13 session_set_save_handler() 32
14 Doctrine 31
15 include require 30
16 http_build_query 29
17 php-devel 29
18 session_destroy関数 27
19 array_diff 27
20 define と const の違い 26
2026/5/21 1:39 更新
週間人気ページランキング / 5-13 → 5-19
順位 ページタイトル抜粋 アクセス数
1 PHP用語 52
2 _FILE__ | 定数 3
3 Parse error: syntax error, unexpected 'new' (T_NEW) | Parse error(エラーメッセージ) 2
3 Fatal error: Call to undefined function **() | Fatal error(エラーメッセージ) 2
3 Parse error: syntax error, unexpected T_REQUIRE_ONCE, expecting T_FUNCTION | Parse error(エラーメッセージ) 2
3 Warning: include(**.php) [function.include]: failed to open stream: No such file | Warning(エラーメッセージ) 2
3 or(||) | 演算子 2
3 Warning: mb_convert_encoding(): Unable to detect character encoding | Warning(エラーメッセージ) 2
3 静的(スタティック)変数 | 変数 2
3 Parse error: syntax error, unexpected T_INCLUDE_ONCE, expecting T_FUNCTION | Parse error(エラーメッセージ) 2
3 Parse error: syntax error, unexpected T_DECLARE, expecting T_STRING in ○○ on lin | Parse error(エラーメッセージ) 2
3 Message: Undefined variable: ○○ | エラーメッセージ 2
3 エラー出力レベル設定 | エラー設定(エラーメッセージ) 2
3 Parse error: syntax error, unexpected T_INCLUDE, expecting T_FUNCTION | Parse error(エラーメッセージ) 2
3 Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting | エラーメッセージ 2
3 dirname() / (__FILE__ ) / basename( dirname( __FILE__ ) ); | 関数 2
3 and | 演算子 2
3 Parse error: syntax error, unexpected T_UNSET in ファイル名 on line 行番号 | Parse error(エラーメッセージ) 2
4 特徴 1
4 Parse error: syntax error, unexpected T_DOUBLE_ARROW in △△ on line □□ | Parse error(エラーメッセージ) 1
2026/5/20 5:05 更新