{"id":1135,"date":"2012-04-05T06:07:50","date_gmt":"2012-04-05T06:07:50","guid":{"rendered":"http:\/\/www.rumahweb.com\/journal\/?p=1135"},"modified":"2017-09-11T03:32:09","modified_gmt":"2017-09-11T03:32:09","slug":"mengatasi-pesan-error-ereg-replace-is-deprecated-di-php-5-3","status":"publish","type":"post","link":"https:\/\/www.rumahweb.com\/journal\/mengatasi-pesan-error-ereg-replace-is-deprecated-di-php-5-3\/","title":{"rendered":"Mengatasi pesan error &#8220;ereg atau ereg_replace is deprecated&#8221; di PHP 5.3"},"content":{"rendered":"<p>Salah satu deprecated function pada PHP versi 5.3.x adalah ereg dan\u00a0 ereg_replace (<span style=\"text-decoration: underline;\"><em>http:\/\/php.net\/manual\/en\/migration53.deprecated.php<\/em><\/span>)<\/p>\n<p>Sehingga jika script website Anda menggunakan function ereg atau \u00a0ereg_replace \u00a0maka akan muncul pesan error &#8220;ereg is deprecated&#8221;<\/p>\n<p>Solusinya adalah dengan melakukan perubahan pada function ereg tersebut dan berikut adalah contohnya:<\/p>\n<p>Untuk perubahan ereg():<br \/>\n<em>[php]<\/em><br \/>\n<em> if (ereg(&#8220;({[A-Z0-9_]+})&#8221;,$template)) [\/php]<\/em><\/p>\n<p>menjadi<!--more--><br \/>\n<em>[php]<\/em><br \/>\n<em> if(preg_match(&#8220;\/({[A-Z0-9_]+})\/&#8221;,$template))<\/em><br \/>\n<em> [\/php]<\/em><\/p>\n<p>Untuk perubahan ereg_replace():<br \/>\n<em>[php]<\/em><br \/>\n<em> $template = ereg_replace(&#8220;{$key}&#8221;,&#8221;$val&#8221;,&#8221;$template&#8221;);<\/em><br \/>\n<em> [\/php]<\/em><\/p>\n<p>menjadi<br \/>\n<em>[php]<\/em><br \/>\n<em> $template = preg_replace(&#8220;\/{$key}\/&#8221;,&#8221;$val&#8221;,&#8221;$template&#8221;); [\/php]<\/em><\/p>\n<p>Untuk perubahan eregi():<br \/>\n<em>[php]<\/em><br \/>\n<em> $is_image = eregi( &#8220;jpg|gif&#8221;,$file_type );<\/em><br \/>\n<em> [\/php]<\/em><\/p>\n<p>menjadi<br \/>\n<em>[php]<\/em><br \/>\n<em> $is_image = preg_match( &#8220;\/jpg|gif\/i&#8221;,$file_type ); <\/em><em>[\/php]<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Salah satu deprecated function pada PHP versi 5.3.x adalah ereg dan\u00a0 ereg_replace (http:\/\/php.net\/manual\/en\/migration53.deprecated.php) Sehingga jika script website Anda menggunakan function ereg atau \u00a0ereg_replace \u00a0maka akan muncul pesan error &#8220;ereg is deprecated&#8221; Solusinya adalah dengan melakukan perubahan pada function ereg tersebut dan berikut adalah contohnya: Untuk perubahan ereg(): [php] if (ereg(&#8220;({[A-Z0-9_]+})&#8221;,$template)) [\/php] menjadi<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,7],"tags":[132,126],"class_list":["post-1135","post","type-post","status-publish","format-standard","category-artikel-tutorial","category-web-programming","tag-deprecated","tag-php-5-3"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"Salah satu deprecated function pada PHP versi 5.3.x adalah ereg dan ereg_replace (http:\/\/php.net\/manual\/en\/migration53.deprecated.php) Sehingga jika script website Anda menggunakan function ereg atau ereg_replace maka akan muncul pesan error &quot;ereg is deprecated&quot; Solusinya adalah dengan melakukan perubahan pada function ereg tersebut dan berikut adalah contohnya: Untuk perubahan ereg(): [php] if (ereg(&quot;({[A-Z0-9_]+})&quot;,$template)) [\/php] menjadi [php] if(preg_match(&quot;\/({[A-Z0-9_]+})\/&quot;,$template)) [\/php]\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Rumahweb\"\/>\n\t<meta name=\"google-site-verification\" content=\"wPstUwU5246IbK_1PqwGrc1LoSDnB-9rPbcT8_vSNgQ\" \/>\n\t<meta name=\"keywords\" content=\"deprecated,php 5.3\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.rumahweb.com\/journal\/mengatasi-pesan-error-ereg-replace-is-deprecated-di-php-5-3\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"id_Id\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Rumahweb Journal \u2013 News, Article, and Tutorial of Web Dev\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Mengatasi pesan error \u201cereg atau ereg_replace is deprecated\u201d di PHP 5.3\" \/>\n\t\t<meta property=\"og:description\" content=\"Salah satu deprecated function pada PHP versi 5.3.x adalah ereg dan ereg_replace (http:\/\/php.net\/manual\/en\/migration53.deprecated.php) Sehingga jika script website Anda menggunakan function ereg atau ereg_replace maka akan muncul pesan error &quot;ereg is deprecated&quot; Solusinya adalah dengan melakukan perubahan pada function ereg tersebut dan berikut adalah contohnya: Untuk perubahan ereg(): [php] if (ereg(&quot;({[A-Z0-9_]+})&quot;,$template)) [\/php] menjadi [php] if(preg_match(&quot;\/({[A-Z0-9_]+})\/&quot;,$template)) [\/php]\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.rumahweb.com\/journal\/mengatasi-pesan-error-ereg-replace-is-deprecated-di-php-5-3\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2012-04-05T06:07:50+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2017-09-11T03:32:09+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RumahwebIndonesia\/\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@rumahwebtweet\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Mengatasi pesan error \u201cereg atau ereg_replace is deprecated\u201d di PHP 5.3\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Salah satu deprecated function pada PHP versi 5.3.x adalah ereg dan ereg_replace (http:\/\/php.net\/manual\/en\/migration53.deprecated.php) Sehingga jika script website Anda menggunakan function ereg atau ereg_replace maka akan muncul pesan error &quot;ereg is deprecated&quot; Solusinya adalah dengan melakukan perubahan pada function ereg tersebut dan berikut adalah contohnya: Untuk perubahan ereg(): [php] if (ereg(&quot;({[A-Z0-9_]+})&quot;,$template)) [\/php] menjadi [php] if(preg_match(&quot;\/({[A-Z0-9_]+})\/&quot;,$template)) [\/php]\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@rumahwebtweet\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Mengatasi pesan error \u201cereg atau ereg_replace is deprecated\u201d di PHP 5.3","description":"Salah satu deprecated function pada PHP versi 5.3.x adalah ereg dan ereg_replace (http:\/\/php.net\/manual\/en\/migration53.deprecated.php) Sehingga jika script website Anda menggunakan function ereg atau ereg_replace maka akan muncul pesan error \"ereg is deprecated\" Solusinya adalah dengan melakukan perubahan pada function ereg tersebut dan berikut adalah contohnya: Untuk perubahan ereg(): [php] if (ereg(\"({[A-Z0-9_]+})\",$template)) [\/php] menjadi [php] if(preg_match(\"\/({[A-Z0-9_]+})\/\",$template)) [\/php]","canonical_url":"https:\/\/www.rumahweb.com\/journal\/mengatasi-pesan-error-ereg-replace-is-deprecated-di-php-5-3\/","robots":"max-image-preview:large","keywords":"deprecated,php 5.3","webmasterTools":{"google-site-verification":"wPstUwU5246IbK_1PqwGrc1LoSDnB-9rPbcT8_vSNgQ","miscellaneous":""},"schema":null,"og:locale":"id_Id","og:site_name":"Rumahweb Journal \u2013 News, Article, and Tutorial of Web Dev","og:type":"article","og:title":"Mengatasi pesan error \u201cereg atau ereg_replace is deprecated\u201d di PHP 5.3","og:description":"Salah satu deprecated function pada PHP versi 5.3.x adalah ereg dan ereg_replace (http:\/\/php.net\/manual\/en\/migration53.deprecated.php) Sehingga jika script website Anda menggunakan function ereg atau ereg_replace maka akan muncul pesan error &quot;ereg is deprecated&quot; Solusinya adalah dengan melakukan perubahan pada function ereg tersebut dan berikut adalah contohnya: Untuk perubahan ereg(): [php] if (ereg(&quot;({[A-Z0-9_]+})&quot;,$template)) [\/php] menjadi [php] if(preg_match(&quot;\/({[A-Z0-9_]+})\/&quot;,$template)) [\/php]","og:url":"https:\/\/www.rumahweb.com\/journal\/mengatasi-pesan-error-ereg-replace-is-deprecated-di-php-5-3\/","article:published_time":"2012-04-05T06:07:50+00:00","article:modified_time":"2017-09-11T03:32:09+00:00","article:publisher":"https:\/\/www.facebook.com\/RumahwebIndonesia\/","twitter:card":"summary_large_image","twitter:site":"@rumahwebtweet","twitter:title":"Mengatasi pesan error \u201cereg atau ereg_replace is deprecated\u201d di PHP 5.3","twitter:description":"Salah satu deprecated function pada PHP versi 5.3.x adalah ereg dan ereg_replace (http:\/\/php.net\/manual\/en\/migration53.deprecated.php) Sehingga jika script website Anda menggunakan function ereg atau ereg_replace maka akan muncul pesan error &quot;ereg is deprecated&quot; Solusinya adalah dengan melakukan perubahan pada function ereg tersebut dan berikut adalah contohnya: Untuk perubahan ereg(): [php] if (ereg(&quot;({[A-Z0-9_]+})&quot;,$template)) [\/php] menjadi [php] if(preg_match(&quot;\/({[A-Z0-9_]+})\/&quot;,$template)) [\/php]","twitter:creator":"@rumahwebtweet"},"aioseo_meta_data":{"post_id":"1135","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"","defaultPostTypeGraph":""},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-21 10:48:45","updated":"2026-04-19 02:57:39","seo_analyzer_scan_date":null},"_links":{"self":[{"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/posts\/1135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/comments?post=1135"}],"version-history":[{"count":0,"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/posts\/1135\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/media?parent=1135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/categories?post=1135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/tags?post=1135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}