<br />
<b>Warning</b>:  "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/qtranslate-x/qtranslate_frontend.php</b> on line <b>497</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
<br />
<b>Warning</b>:  preg_replace(): Compilation failed: invalid range in character class at offset 4 in <b>/home/users/2/flatworld/web/memoecho.com/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php</b> on line <b>340</b><br />
{"id":1703,"date":"2018-05-28T07:03:42","date_gmt":"2018-05-28T07:03:42","guid":{"rendered":"http:\/\/tech.memoecho.com\/?p=1703"},"modified":"2018-05-28T07:03:42","modified_gmt":"2018-05-28T07:03:42","slug":"%e4%b8%ad%e6%96%87-function-eregi-is-deprecated-%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/tech.memoecho.com\/zh\/php\/dedecms\/%e4%b8%ad%e6%96%87-function-eregi-is-deprecated-%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95\/","title":{"rendered":"Function eregi is deprecated (\u89e3\u51b3\u65b9\u6cd5)"},"content":{"rendered":"<!-- WP QUADS Content Ad Plugin v. 2.0.19 -->\n<div class=\"quads-location quads-ad2\" id=\"quads-ad2\" style=\"float:none;margin:0px;\">\n\n <!-- WP QUADS - Quick AdSense Reloaded v.2.0.19 Content AdSense async --> \n\n\n<script type=\"text\/javascript\" >\nvar quads_screen_width = document.body.clientWidth;\nif ( quads_screen_width >= 1140 ) {document.write('<ins class=\"adsbygoogle\" style=\"display:inline-block;width:336px;height:280px;\" data-ad-client=\"pub-8568501110011894\" data-ad-slot=\"4911828489\" ><\/ins>');\r\n            (adsbygoogle = window.adsbygoogle || []).push({});\r\n            }if ( quads_screen_width >= 1024  && quads_screen_width < 1140 ) {document.write('<ins class=\"adsbygoogle\" style=\"display:inline-block;width:336px;height:280px;\" data-ad-client=\"pub-8568501110011894\" data-ad-slot=\"4911828489\" ><\/ins>');\r\n            (adsbygoogle = window.adsbygoogle || []).push({});\r\n            }if ( quads_screen_width >= 768  && quads_screen_width < 1024 ) {document.write('<ins class=\"adsbygoogle\" style=\"display:inline-block;width:336px;height:280px;\" data-ad-client=\"pub-8568501110011894\" data-ad-slot=\"4911828489\" ><\/ins>');\r\n            (adsbygoogle = window.adsbygoogle || []).push({});\r\n            }if ( quads_screen_width < 768 ) {document.write('<ins class=\"adsbygoogle\" style=\"display:inline-block;width:336px;height:280px;\" data-ad-client=\"pub-8568501110011894\" data-ad-slot=\"4911828489\" ><\/ins>');\r\n            (adsbygoogle = window.adsbygoogle || []).push({});\r\n            }\n<\/script>\n\n <!-- end WP QUADS --> \n\n\n<\/div>\n<p>\u5728php\u5347\u7ea7\u5230php5.3\u4e4b\u540e\u540e\uff0c\u5728\u4f7f\u7528\u7684\u8fc7\u7a0b\u7ecf\u5e38\u53d1\u73b0\u6709\u7684\u7a0b\u5e8f\u4f1a\u51fa\u73b0Function eregi() is deprecated \u7684\u62a5\u9519\u4fe1\u606f\u3002<strong><span>\u662f\u4ec0\u4e48\u539f\u56e0\u5462\uff1f<br \/>\n<\/span><\/strong>\u8fd9\u662f\u56e0\u4e3aphp5.3\u4e2d\u4e0d\u518d\u652f\u6301eregi()\u51fd\u6570\uff0c\u800c\u4f7f\u7528preg_match()\u51fd\u6570\u66ff\u4ee3\u3002<br \/>\n<strong><span>\u89e3\u51b3\u7684\u65b9\u6cd5\u662f\uff1a\u5c06eregi()\u51fd\u6570\u66ff\u6362\u6210preg_match() \u51fd\u6570\u3002<br \/>\n<\/span><\/strong><span>\u00a0if(eregi(&#8216;^test&#8217;,$file))<br \/>\n\u53ef\u4ee5\u66ff\u6362\u4e3a<br \/>\nif(preg_match(&#8216;\/^test\/i&#8217;,$file))<br \/>\n<\/span><br \/>\n\u2014\u2014\u2014\u2014-<br \/>\nPHP 5.3.0 \u4e4b\u5f8c\u7684 regex, \u5e0c\u671b\u4f7f\u7528 PCRE \u7684\u898f\u683c, POSIX Regex \u90fd\u4e0d\u5efa\u8b70\u4f7f\u7528\u4e86(\u7d71\u4e00 Regex, \u907f\u514d\u898f\u683c\u592a\u591a?).<br \/>\n\u6240\u4ee5\u4e0b\u8ff0\u662f\u4e0d\u5efa\u8b70\u4f7f\u7528\u7684 Function (POSIX), \u8207\u5efa\u8b70\u66ff\u63db\u6210\u7684 Function (PCRE) \u5217\u8868, \u8a73\u53ef\u898b: PHP:<br \/>\nDifferences from POSIX regex<br \/>\n* POSIX \u2192 PCRE<br \/>\n* ereg_replace() \u2192 preg_replace()<br \/>\n* ereg() \u2192 preg_match()<br \/>\n* eregi_replace() \u2192 preg_replace()<br \/>\n* eregi() \u2192 preg_match()<br \/>\n* split() \u2192 preg_split()<br \/>\n* spliti() \u2192 preg_split()<br \/>\n* sql_regcase() \u2192 No equivalent<br \/>\n* \u9700\u8981 regex \u7684 split, \u53ef\u7528 preg_split() \u4ee3\u66ff<br \/>\n* \u4e0d\u9700\u8981 regex, \u53ea\u8981\u8981\u5feb\u901f\u5206\u5272\u56fa\u5b9a\u7684\u5b57\u4e32, \u53ef\u7528 explode() \u4ee3\u66ff. (\u901f\u5ea6\u6703\u6bd4\u9700\u8981 regex \u7684\u5feb\u5f88\u591a)<\/p>\n<!-- WP QUADS Content Ad Plugin v. 2.0.19 -->\n<div class=\"quads-location quads-ad2\" id=\"quads-ad2\" style=\"float:none;margin:0px;\">\n\n <!-- WP QUADS - Quick AdSense Reloaded v.2.0.19 Content AdSense async --> \n\n\n<script type=\"text\/javascript\" >\nvar quads_screen_width = document.body.clientWidth;\nif ( quads_screen_width >= 1140 ) {document.write('<ins class=\"adsbygoogle\" style=\"display:inline-block;width:336px;height:280px;\" data-ad-client=\"pub-8568501110011894\" data-ad-slot=\"4911828489\" ><\/ins>');\r\n            (adsbygoogle = window.adsbygoogle || []).push({});\r\n            }if ( quads_screen_width >= 1024  && quads_screen_width < 1140 ) {document.write('<ins class=\"adsbygoogle\" style=\"display:inline-block;width:336px;height:280px;\" data-ad-client=\"pub-8568501110011894\" data-ad-slot=\"4911828489\" ><\/ins>');\r\n            (adsbygoogle = window.adsbygoogle || []).push({});\r\n            }if ( quads_screen_width >= 768  && quads_screen_width < 1024 ) {document.write('<ins class=\"adsbygoogle\" style=\"display:inline-block;width:336px;height:280px;\" data-ad-client=\"pub-8568501110011894\" data-ad-slot=\"4911828489\" ><\/ins>');\r\n            (adsbygoogle = window.adsbygoogle || []).push({});\r\n            }if ( quads_screen_width < 768 ) {document.write('<ins class=\"adsbygoogle\" style=\"display:inline-block;width:336px;height:280px;\" data-ad-client=\"pub-8568501110011894\" data-ad-slot=\"4911828489\" ><\/ins>');\r\n            (adsbygoogle = window.adsbygoogle || []).push({});\r\n            }\n<\/script>\n\n <!-- end WP QUADS --> \n\n\n<\/div>","protected":false},"excerpt":{"rendered":"<p>\u5728php\u5347\u7ea7\u5230php5.3\u4e4b\u540e\u540e\uff0c\u5728\u4f7f\u7528\u7684\u8fc7\u7a0b\u7ecf\u5e38\u53d1\u73b0\u6709\u7684\u7a0b\u5e8f\u4f1a\u51fa\u73b0Function eregi() is deprecated \u7684\u62a5\u9519\u4fe1\u606f\u3002\u662f\u4ec0\u4e48\u539f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[39],"tags":[193],"pwapp_after_post_content":"","pwapp_before_post_content":"","androapp_header":"","pwapp_author":{"ID":1,"name":"enadmin","slug":"enadmin"},"pwapp_terms":{"category":[{"term_id":39,"name":"dedecms","slug":"dedecms","term_group":0,"term_taxonomy_id":39,"taxonomy":"category","description":"","parent":2,"count":13,"filter":"raw","cat_ID":39,"category_count":13,"category_description":"","cat_name":"dedecms","category_nicename":"dedecms","category_parent":2,"ID":39}],"post_tag":[{"term_id":193,"name":"php\u7248\u672c","slug":"php%e7%89%88%e6%9c%ac","term_group":0,"term_taxonomy_id":193,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw","ID":193}]},"pwapp_feed_image_dimension_type":"preview","pwapp_post_image":null,"share_image":null,"featured_image_showhide":"show","pwapp_excerpt":"<p>\u5728php\u5347\u7ea7\u5230php5.3\u4e4b\u540e\u540e\uff0c\u5728\u4f7f\u7528\u7684\u8fc7\u7a0b\u7ecf\u5e38\u53d1\u73b0\u6709\u7684\u7a0b\u5e8f\u4f1a\u51fa\u73b0Function eregi() is deprecated \u7684\u62a5\u9519\u4fe1\u606f\u3002\u662f\u4ec0\u4e48\u539f [&hellip;]<\/p>\n","pwapp_title":"Function eregi is deprecated (\u89e3\u51b3\u65b9\u6cd5)","androapp_image_list":[],"pwapp_post_content":"<style type=\"text\/css\">androapp img{\r\n    max-width: 100%;\r\n    height: auto;\r\n}\r\niframe{\r\n    max-width: 100%;    \r\n}\r\nfigure {\r\n    max-width: 100%;\r\n    height: auto;\r\n}\r\nimg{\r\n    max-width: 100% !important;\r\n    height: auto;\r\n}\r\ndiv {\r\n    max-width: 100% !important;\r\n}\r\nspan {\r\n    max-width:100%;\r\n    overflow: auto;\r\n}\r\naudio {\r\n    display:block;\r\n    visibility:visible !important;\r\n}\r\nvideo{\r\n    width:100%;\r\n    height:auto;\r\n}\r\n<\/style><div class='androapp'><p>\u5728php\u5347\u7ea7\u5230php5.3\u4e4b\u540e\u540e\uff0c\u5728\u4f7f\u7528\u7684\u8fc7\u7a0b\u7ecf\u5e38\u53d1\u73b0\u6709\u7684\u7a0b\u5e8f\u4f1a\u51fa\u73b0Function eregi() is deprecated \u7684\u62a5\u9519\u4fe1\u606f\u3002<strong><span>\u662f\u4ec0\u4e48\u539f\u56e0\u5462\uff1f<br \/>\n<\/span><\/strong>\u8fd9\u662f\u56e0\u4e3aphp5.3\u4e2d\u4e0d\u518d\u652f\u6301eregi()\u51fd\u6570\uff0c\u800c\u4f7f\u7528preg_match()\u51fd\u6570\u66ff\u4ee3\u3002<br \/>\n<strong><span>\u89e3\u51b3\u7684\u65b9\u6cd5\u662f\uff1a\u5c06eregi()\u51fd\u6570\u66ff\u6362\u6210preg_match() \u51fd\u6570\u3002<br \/>\n<\/span><\/strong><span>\u00a0if(eregi(&#8216;^test&#8217;,$file))<br \/>\n\u53ef\u4ee5\u66ff\u6362\u4e3a<br \/>\nif(preg_match(&#8216;\/^test\/i&#8217;,$file))<br \/>\n<\/span><br \/>\n\u2014\u2014\u2014\u2014-<br \/>\nPHP 5.3.0 \u4e4b\u5f8c\u7684 regex, \u5e0c\u671b\u4f7f\u7528 PCRE \u7684\u898f\u683c, POSIX Regex \u90fd\u4e0d\u5efa\u8b70\u4f7f\u7528\u4e86(\u7d71\u4e00 Regex, \u907f\u514d\u898f\u683c\u592a\u591a?).<br \/>\n\u6240\u4ee5\u4e0b\u8ff0\u662f\u4e0d\u5efa\u8b70\u4f7f\u7528\u7684 Function (POSIX), \u8207\u5efa\u8b70\u66ff\u63db\u6210\u7684 Function (PCRE) \u5217\u8868, \u8a73\u53ef\u898b: PHP:<br \/>\nDifferences from POSIX regex<br \/>\n* POSIX \u2192 PCRE<br \/>\n* ereg_replace() \u2192 preg_replace()<br \/>\n* ereg() \u2192 preg_match()<br \/>\n* eregi_replace() \u2192 preg_replace()<br \/>\n* eregi() \u2192 preg_match()<br \/>\n* split() \u2192 preg_split()<br \/>\n* spliti() \u2192 preg_split()<br \/>\n* sql_regcase() \u2192 No equivalent<br \/>\n* \u9700\u8981 regex \u7684 split, \u53ef\u7528 preg_split() \u4ee3\u66ff<br \/>\n* \u4e0d\u9700\u8981 regex, \u53ea\u8981\u8981\u5feb\u901f\u5206\u5272\u56fa\u5b9a\u7684\u5b57\u4e32, \u53ef\u7528 explode() \u4ee3\u66ff. (\u901f\u5ea6\u6703\u6bd4\u9700\u8981 regex \u7684\u5feb\u5f88\u591a)<\/p><\/div>","pwapp_post_content_type":"postprocessed","pwapp_preview_type":"excerpt","androapp_failover_post_content_type":"","share_text":"\u5728php\u5347\u7ea7\u5230php5.3\u4e4b\u540e\u540e\uff0c\u5728\u4f7f\u7528\u7684\u8fc7\u7a0b\u7ecf\u5e38\u53d1\u73b0\u6709\u7684\u7a0b\u5e8f\u4f1a\u51fa\u73b0Function eregi() is deprecated \u7684\u62a5\u9519\u4fe1\u606f\u3002\u662f\u4ec0\u4e48\u539f [&hellip;]\n\nvia http:\/\/tech.memoecho.com\/zh\/php\/dedecms\/%e4%b8%ad%e6%96%87-function-eregi-is-deprecated-%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95\/","supercache":"androappsupercache","_links":{"self":[{"href":"http:\/\/tech.memoecho.com\/zh\/wp-json\/wp\/v2\/posts\/1703"}],"collection":[{"href":"http:\/\/tech.memoecho.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tech.memoecho.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tech.memoecho.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tech.memoecho.com\/zh\/wp-json\/wp\/v2\/comments?post=1703"}],"version-history":[{"count":1,"href":"http:\/\/tech.memoecho.com\/zh\/wp-json\/wp\/v2\/posts\/1703\/revisions"}],"predecessor-version":[{"id":1704,"href":"http:\/\/tech.memoecho.com\/zh\/wp-json\/wp\/v2\/posts\/1703\/revisions\/1704"}],"wp:attachment":[{"href":"http:\/\/tech.memoecho.com\/zh\/wp-json\/wp\/v2\/media?parent=1703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tech.memoecho.com\/zh\/wp-json\/wp\/v2\/categories?post=1703"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tech.memoecho.com\/zh\/wp-json\/wp\/v2\/tags?post=1703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}