{"id":820,"date":"2025-08-04T17:24:25","date_gmt":"2025-08-04T08:24:25","guid":{"rendered":"https:\/\/nexive.tech\/?p=820"},"modified":"2025-08-04T17:24:25","modified_gmt":"2025-08-04T08:24:25","slug":"%e3%80%90%e3%82%b5%e3%82%af%e3%83%83%e3%81%a8%e8%a7%a3%e8%aa%ac%e3%80%91php-error_reporting%e3%81%a7%e3%82%a8%e3%83%a9%e3%83%bc%e3%83%ac%e3%83%99%e3%83%ab%e3%82%92%e5%88%b6%e5%be%a1%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/nexive.tech\/?p=820","title":{"rendered":"\u3010\u30b5\u30af\u30c3\u3068\u89e3\u8aac\u3011PHP error_reporting\u3067\u30a8\u30e9\u30fc\u30ec\u30d9\u30eb\u3092\u5236\u5fa1\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1. \u672c\u8a18\u4e8b\u306e\u30dd\u30a4\u30f3\u30c8<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PHP\u306e\u30a8\u30e9\u30fc\u51fa\u529b\u30ec\u30d9\u30eb\u3092\u7d30\u304b\u304f\u5236\u5fa1\u3067\u304d\u308b<code>error_reporting()<\/code>\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3092\u89e3\u8aac<\/li>\n\n\n\n<li>\u5b9f\u884c\u74b0\u5883\u3084\u904b\u7528\u6bb5\u968e\u306b\u5fdc\u3058\u305f\u9069\u5207\u306a\u8a2d\u5b9a\u65b9\u6cd5\u3092\u7d39\u4ecb<\/li>\n\n\n\n<li>\u958b\u767a\u30fb\u672c\u756a\u3067\u306e\u4f7f\u3044\u5206\u3051\u3084\u3001\u975e\u63a8\u5968\u8b66\u544a\u306e\u5236\u5fa1\u65b9\u6cd5\u3082\u542b\u3081\u3066\u7db2\u7f85<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">2. PHP\u306eerror_reporting\u3068\u306f\uff1f<\/h2>\n\n\n\n<p>PHP\u306b\u304a\u3051\u308b<code>error_reporting()<\/code>\u95a2\u6570\u306f\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u5185\u3067\u8868\u793a\u30fb\u8a18\u9332\u3059\u308b\u30a8\u30e9\u30fc\u306e\u7a2e\u985e\uff08\u30ec\u30d9\u30eb\uff09\u3092\u5236\u5fa1\u3059\u308b\u305f\u3081\u306e\u95a2\u6570\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30a8\u30e9\u30fc\u306b\u306f\u3001\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u3001\u8b66\u544a\u3001\u6ce8\u610f\u3001\u975e\u63a8\u5968\u6a5f\u80fd\u306e\u901a\u77e5\u306a\u3069\u8907\u6570\u306e\u30ec\u30d9\u30eb\u304c\u3042\u308a\u3001\u305d\u308c\u305e\u308c\u5b9a\u6570\u3067\u8868\u73fe\u3055\u308c\u307e\u3059\uff08\u4f8b\uff1a<code>E_ERROR<\/code>, <code>E_WARNING<\/code>, <code>E_NOTICE<\/code>, <code>E_DEPRECATED<\/code>\u306a\u3069\uff09\u3002<code>error_reporting()<\/code>\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u7279\u5b9a\u306e\u30a8\u30e9\u30fc\u30bf\u30a4\u30d7\u3060\u3051\u3092\u8868\u793a\u3055\u305b\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u958b\u767a\u74b0\u5883\u3067\u306f\u8a73\u7d30\u306a\u30a8\u30e9\u30fc\u3092\u3059\u3079\u3066\u51fa\u529b\u3057\u3066\u554f\u984c\u306e\u65e9\u671f\u767a\u898b\u3092\u56f3\u308a\u3001\u672c\u756a\u74b0\u5883\u3067\u306f\u81f4\u547d\u7684\u306a\u30a8\u30e9\u30fc\u4ee5\u5916\u306f\u975e\u8868\u793a\u306b\u3059\u308b\u306a\u3069\u3001\u74b0\u5883\u306b\u5fdc\u3058\u305f\u5207\u308a\u66ff\u3048\u304c\u4e00\u822c\u7684\u3067\u3059\u3002<\/p>\n\n\n\n<p>PHP\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\uff08php.ini\uff09\u3067\u3082\u540c\u69d8\u306e\u8a2d\u5b9a\u306f\u53ef\u80fd\u3067\u3059\u304c\u3001<code>error_reporting()<\/code>\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u5185\u3067\u500b\u5225\u5236\u5fa1\u3067\u304d\u308b\u70b9\u304c\u7279\u9577\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. \u8a73\u7d30\u89e3\u8aac<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u958b\u767a\u6642\u306b\u3059\u3079\u3066\u306e\u30a8\u30e9\u30fc\u3092\u8868\u793a\u3059\u308b\u8a2d\u5b9a<\/h3>\n\n\n\n<p>\u30c7\u30d0\u30c3\u30b0\u4e2d\u306e\u958b\u767a\u74b0\u5883\u3067\u306f\u3001\u3059\u3079\u3066\u306e\u30a8\u30e9\u30fc\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u671b\u307e\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e\"><span style=\"background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&lt;?php\n\/\/ \u3059\u3079\u3066\u306e\u30a8\u30e9\u30fc\u3092\u8868\u793a\u3059\u308b\nerror_reporting(E_ALL);\nini_set('display_errors', '1');\n\n\/\/ \u901a\u5e38\u306e\u6ce8\u610f\u30e1\u30c3\u30bb\u30fc\u30b8\u3082\u8868\u793a\u3055\u308c\u308b\necho $undefined_var; \/\/ Notice: Undefined variable\n?>\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\">\/\/ \u3059\u3079\u3066\u306e\u30a8\u30e9\u30fc\u3092\u8868\u793a\u3059\u308b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">error_reporting<\/span><span style=\"color: #D4D4D4\">(E_ALL);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">ini_set<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&#39;display_errors&#39;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">&#39;1&#39;<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\">\/\/ \u901a\u5e38\u306e\u6ce8\u610f\u30e1\u30c3\u30bb\u30fc\u30b8\u3082\u8868\u793a\u3055\u308c\u308b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">echo<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">$undefined_var<\/span><span style=\"color: #D4D4D4\">; <\/span><span style=\"color: #6A9955\">\/\/ Notice: Undefined variable<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">?&gt;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p><code>E_ALL<\/code>\u306f\u73fe\u5728\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30a8\u30e9\u30fc\u30ec\u30d9\u30eb\u3092\u542b\u3080\u5b9a\u6570\u3067\u3059\u3002<code>ini_set('display_errors', '1')<\/code>\u3082\u4f75\u7528\u3057\u306a\u3044\u3068\u3001\u30d6\u30e9\u30a6\u30b6\u306b\u306f\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u672c\u756a\u74b0\u5883\u3067\u975e\u8868\u793a\u306b\u3059\u308b\u8a2d\u5b9a<\/h3>\n\n\n\n<p>\u672c\u756a\u74b0\u5883\u3067\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u30a8\u30e9\u30fc\u5185\u5bb9\u3092\u898b\u305b\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e\"><span style=\"background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&lt;?php\n\/\/ \u81f4\u547d\u7684\u306a\u30a8\u30e9\u30fc\u4ee5\u5916\u306f\u5831\u544a\u3057\u306a\u3044\nerror_reporting(0);\nini_set('display_errors', '0');\n?>\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\">\/\/ \u81f4\u547d\u7684\u306a\u30a8\u30e9\u30fc\u4ee5\u5916\u306f\u5831\u544a\u3057\u306a\u3044<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">error_reporting<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">ini_set<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #CE9178\">&#39;display_errors&#39;<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #CE9178\">&#39;0&#39;<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">?&gt;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u3067\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3084UX\u306e\u89b3\u70b9\u304b\u3089\u3082\u671b\u307e\u3057\u3044\u72b6\u614b\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7279\u5b9a\u306e\u30a8\u30e9\u30fc\u30ec\u30d9\u30eb\u306e\u307f\u9664\u5916\u3059\u308b<\/h3>\n\n\n\n<p>\u975e\u63a8\u5968\u6a5f\u80fd\uff08<code>E_DEPRECATED<\/code>\uff09\u306e\u8b66\u544a\u3060\u3051\u3092\u9664\u5916\u3057\u305f\u3044\u5834\u5408\u306e\u4f8b\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e\"><span style=\"background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&lt;?php\n\/\/ \u975e\u63a8\u5968\u8b66\u544a\u3060\u3051\u3092\u9664\u5916\u3059\u308b\nerror_reporting(E_ALL &amp; ~E_DEPRECATED);\n?>\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\">\/\/ \u975e\u63a8\u5968\u8b66\u544a\u3060\u3051\u3092\u9664\u5916\u3059\u308b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">error_reporting<\/span><span style=\"color: #D4D4D4\">(E_ALL &amp; ~E_DEPRECATED);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">?&gt;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u30d3\u30c3\u30c8\u6f14\u7b97\u5b50 <code>~<\/code> \u306f\u5426\u5b9a\u3092\u610f\u5473\u3057\u3001<code>&amp;<\/code> \u306f\u9664\u5916\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u8907\u6570\u306e\u30a8\u30e9\u30fc\u3092\u9664\u5916\u3057\u305f\u3044\u5834\u5408\u306f <code>|<\/code> \u3092\u4f7f\u3063\u3066\u7d44\u307f\u5408\u308f\u305b\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e\"><span style=\"background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&lt;?php\n\/\/ E_NOTICE \u3068 E_DEPRECATED \u3092\u9664\u5916\nerror_reporting(E_ALL &amp; ~(E_NOTICE | E_DEPRECATED));\n?>\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6A9955\">\/\/ E_NOTICE \u3068 E_DEPRECATED \u3092\u9664\u5916<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">error_reporting<\/span><span style=\"color: #D4D4D4\">(E_ALL &amp; ~(E_NOTICE | E_DEPRECATED));<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">?&gt;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u30a8\u30e9\u30fc\u5831\u544a\u30ec\u30d9\u30eb\u306e\u78ba\u8a8d<\/h3>\n\n\n\n<p>\u73fe\u5728\u306e\u30a8\u30e9\u30fc\u30ec\u30d9\u30eb\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e\"><span style=\"background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&lt;?php\nvar_dump(error_reporting());\n?>\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D4D4D4\">&lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">var_dump<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #DCDCAA\">error_reporting<\/span><span style=\"color: #D4D4D4\">());<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">?&gt;<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u306e\u95a2\u6570\u306f\u73fe\u5728\u306e\u8a2d\u5b9a\u5024\uff08\u6574\u6570\uff09\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. \u3088\u304f\u3042\u308b\u30df\u30b9\u30fb\u8aa4\u89e3\u30fb\u843d\u3068\u3057\u7a74<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>error_reporting()<\/code> \u3092\u8a2d\u5b9a\u3057\u3066\u3082\u3001<code>display_errors<\/code> \u304c\u6709\u52b9\u3067\u306a\u3051\u308c\u3070\u30d6\u30e9\u30a6\u30b6\u306b\u8868\u793a\u3055\u308c\u306a\u3044<\/li>\n\n\n\n<li><code>php.ini<\/code> \u306e\u8a2d\u5b9a\u304c\u4e0a\u66f8\u304d\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6c17\u3065\u304b\u305a\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306e<code>error_reporting()<\/code>\u304c\u52b9\u304b\u306a\u3044\u30b1\u30fc\u30b9\u304c\u3042\u308b<\/li>\n\n\n\n<li>\u672c\u756a\u74b0\u5883\u3067 <code>E_ALL<\/code> \u3092\u6709\u52b9\u306b\u3057\u305f\u307e\u307e\u306b\u3057\u3066\u3057\u307e\u3044\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u5185\u90e8\u60c5\u5831\u304c\u30e6\u30fc\u30b6\u30fc\u306b\u6f0f\u308c\u308b<\/li>\n\n\n\n<li><code>E_STRICT<\/code> \u306f PHP 5.4 \u4ee5\u964d\u3067\u306f <code>E_ALL<\/code> \u306b\u542b\u307e\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u304c\u3001\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u5225\u6271\u3044\u306e\u305f\u3081\u6ce8\u610f\u304c\u5fc5\u8981<\/li>\n<\/ul>\n\n\n\n<p>\u307e\u305f\u3001\u30ed\u30b0\u51fa\u529b\u306e\u8a2d\u5b9a\uff08<code>log_errors<\/code>, <code>error_log<\/code>\uff09\u3092\u4f75\u7528\u3057\u306a\u3044\u3068\u3001\u975e\u8868\u793a\u30a8\u30e9\u30fc\u304c\u691c\u77e5\u3067\u304d\u306a\u3044\u307e\u307e\u306b\u306a\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. \u307e\u3068\u3081<\/h2>\n\n\n\n<p><code>error_reporting()<\/code>\u306f\u3001PHP\u306e\u30a8\u30e9\u30fc\u51fa\u529b\u3092\u67d4\u8edf\u306b\u5236\u5fa1\u3067\u304d\u308b\u57fa\u672c\u7684\u304b\u3064\u91cd\u8981\u306a\u95a2\u6570\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u958b\u767a\u6642\u306b\u306f<code>E_ALL<\/code>\u3067\u8a73\u7d30\u306a\u60c5\u5831\u3092\u5f97\u3089\u308c\u308b\u4e00\u65b9\u3001\u672c\u756a\u74b0\u5883\u3067\u306f0\u307e\u305f\u306f\u9650\u5b9a\u7684\u306a\u30ec\u30d9\u30eb\u3067\u5b89\u5168\u306b\u904b\u7528\u3059\u3079\u304d\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30d3\u30c3\u30c8\u6f14\u7b97\u306b\u3088\u308b\u500b\u5225\u5236\u5fa1\u3084\u3001<code>ini_set()<\/code>\u3068\u306e\u4f75\u7528\u3001\u30ed\u30b0\u51fa\u529b\u8a2d\u5b9a\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u74b0\u5883\u306b\u6700\u9069\u306a\u30a8\u30e9\u30fc\u7ba1\u7406\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>1. \u672c\u8a18\u4e8b\u306e\u30dd\u30a4\u30f3\u30c8 2. PHP\u306eerror_reporting\u3068\u306f\uff1f PHP\u306b\u304a\u3051\u308berror_reporting()\u95a2\u6570\u306f\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u5185\u3067\u8868\u793a\u30fb\u8a18\u9332\u3059\u308b\u30a8\u30e9\u30fc\u306e\u7a2e\u985e\uff08\u30ec\u30d9\u30eb\uff09\u3092\u5236\u5fa1\u3059\u308b\u305f\u3081\u306e\u95a2\u6570\u3067\u3059\u3002 \u30a8\u30e9\u30fc\u306b\u306f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":897,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[85],"tags":[],"class_list":["post-820","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=820"}],"version-history":[{"count":2,"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/820\/revisions"}],"predecessor-version":[{"id":898,"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/820\/revisions\/898"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/media\/897"}],"wp:attachment":[{"href":"https:\/\/nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}