{"id":608,"date":"2006-03-29T01:00:00","date_gmt":"2006-03-28T16:00:00","guid":{"rendered":"https:\/\/ecoop.net\/memo\/2006-03-29-1.html"},"modified":"2006-03-29T01:00:00","modified_gmt":"2006-03-28T16:00:00","slug":"2006-03-29-1","status":"publish","type":"post","link":"https:\/\/www.ecoop.net\/memo\/archives\/2006-03-29-1.html","title":{"rendered":"PHP5 \u3067 PEAR \u306e\u5185\u90e8\u3067 Non-Static method \u30a8\u30e9\u30fc\u304c\u51fa\u308b"},"content":{"rendered":"<p>\nPHP5 \u3067 set_error_handler() \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u3068\u3001PEAR \u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u5404\u6240(PEAR::isError, DB::connect \u306a\u3069)\u3067 E_STRICT(=2048) \u304c\u767a\u751f\u3057\u307e\u3059\u3002<br \/>\nset_error_handler \u306e\u547c\u3073\u51fa\u3057\u3092\u6b21\u306e\u3088\u3046\u306b\u5909\u66f4\u3059\u308b\u3068\u56de\u907f\u53ef\u80fd\u3067\u3059\u3002\n<\/p>\n<blockquote><p>\u5909\u66f4\u524d:<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;set_error_handler(&#8216;handler&#8217;);<br \/>\n\u5909\u66f4\u5f8c:<br \/>\n&nbsp;define(&#8216;PHP5&#8217;, version_compare( phpversion(), &#8220;5.0.0&#8221;, &#8220;>=&#8221; ));<br \/>\n&nbsp;if(PHP5){<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$old_error_handler = set_error_handler(&#8216;handler&#8217;, E_ALL);<br \/>\n&nbsp;}else{<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$old_error_handler = set_error_handler(&#8216;handler&#8217;);<br \/>\n&nbsp;}\n<\/p><\/blockquote>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5fdc\u3058\u3066\u7b2c\u4e8c\u5f15\u6570\u3092\u4e0e\u3048\u3066\u3044\u308b\u306e\u304c\u30df\u30bd\u3067\u3059\u3002\u3082\u3061\u308d\u3093\u3001PHP5\u3060\u3051\u306b\u5bfe\u5fdc\u3059\u308b\u306e\u3067\u3042\u308c\u3070\u3001\u5358\u7d14\u306b\u65e2\u5b58\u306e\u3082\u306e\u306b\u7b2c\u4e8c\u5f15\u6570\u3092\u4e0e\u3048\u308c\u3070\u3044\u3044\u3060\u3051\u3067\u3059\u3002<br \/>\n&nbsp;<br \/>\nPHP5 (5.0.5 \u3067\u78ba\u8a8d)\u3067\u306f static \u30e1\u30bd\u30c3\u30c9\u306e\u8a8d\u8b58\u304c\u5fae\u5999\u3067\u3059\u306d\u3002<br \/>\n&nbsp;<br \/>\n\u53c2\u8003:<br \/>\n&#8211; <a href=\"http:\/\/code.campware.org\/projects\/livesupport\/ticket\/1491\">#1491(Make code work on both PHP4 and PHP5)<\/a> (LiveSupport &#8211; Trac)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP5 \u3067 set_error_handler() \u3092\u5229\u7528\u3057\u3066\u3044\u308b\u3068\u3001PEAR \u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u5404\u6240(PEAR::isError, DB::connect \u306a\u3069)\u3067 E_STRICT(=2048) \u304c\u767a\u751f\u3057\u307e\u3059\u3002 set &hellip; <a href=\"https:\/\/www.ecoop.net\/memo\/archives\/2006-03-29-1.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">PHP5 \u3067 PEAR \u306e\u5185\u90e8\u3067 Non-Static method \u30a8\u30e9\u30fc\u304c\u51fa\u308b<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[32],"class_list":["post-608","post","type-post","status-publish","format-standard","hentry","tag-php"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/comments?post=608"}],"version-history":[{"count":0,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/608\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/media?parent=608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/categories?post=608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/tags?post=608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}