{"id":1853,"date":"2021-11-11T18:03:51","date_gmt":"2021-11-11T09:03:51","guid":{"rendered":"https:\/\/ani2life.com\/wp\/?p=1853"},"modified":"2021-11-11T18:03:51","modified_gmt":"2021-11-11T09:03:51","slug":"php%eb%a1%9c-%ed%95%9c%ea%b8%80-%eb%ac%b8%ec%9e%90%ec%97%b4%ec%97%90%ec%84%9c-%ec%9d%b4%ea%b0%80-%ec%9d%80%eb%8a%94-%ec%9d%84%eb%a5%bc-%ec%a1%b0%ec%82%ac-%ec%a4%91%ec%97%90-%eb%a7%9e%eb%8a%94","status":"publish","type":"post","link":"https:\/\/ani2life.com\/wp\/?p=1853","title":{"rendered":"PHP\ub85c \ud55c\uae00 \ubb38\uc790\uc5f4\uc5d0\uc11c \uc774(\uac00), \uc740(\ub294), \uc744(\ub97c) \uc870\uc0ac \uc911\uc5d0 \ub9de\ub294 \uac83\uc73c\ub85c \uace0\uce58\uae30"},"content":{"rendered":"<p>\ud55c\uae00 \ubb38\uc790\uc5f4\uc5d0 \uc774(\uac00), \uc740(\ub294), \uc744(\ub97c) \uc870\uc0ac\uac00 \ud3ec\ud568\ub41c \uacbd\uc6b0 \ub9de\ub294 \uac83\uc73c\ub85c \uace0\uccd0\uc11c \ubc18\ud658\ud558\ub294 \ud568\uc218\ub97c \ub9cc\ub4e4\uc5b4\ubd24\ub2e4.<\/p>\n<p>\uc870\uc0ac \uc55e\uae00\uc790\uc758 \ubc1b\uce68 \uc720\ubb34\uc5d0 \ub530\ub77c \uc5b4\ub5a4 \uc870\uc0ac\uac00 \ubd99\uc744\uc9c0 \uc120\ud0dd\ub418\ub294 \uac04\ub2e8\ud55c \ub85c\uc9c1\uc73c\ub85c \ucf54\ub4dc\ub294 \uc9e7\uace0 \ub2e8\uc21c\ud558\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"php\">&lt;?php\r\nfunction fixHangulJosa(string $text): string\r\n{\r\n    return preg_replace_callback('\/\r\n        ([\uac00-\ud7a3])(\r\n        \uc744\\(\ub97c\\)\r\n        |\uc774\\(\uac00\\)\r\n        |\uc740\\(\ub294\\)\r\n        )\r\n    \/ux', function ($matches) {\r\n        $coda = (mb_ord($matches[1]) - 0xAC00) % 28;\r\n        $start = $coda ? 0 : 2;\r\n        return $matches[1] . mb_substr($matches[2], $start, 1);\r\n    }, $text);\r\n}\r\n\r\n$text = '\ub098\ubb47\uc78e\uc774(\uac00) \ub2e8\ud48d \ub4dc\ub294 \uac00\uc744\uc740(\ub294) \uc6b0\ub9ac\uc744(\ub97c) \uac10\uc0c1\uc5d0 \uc816\uac8c \ub9cc\ub4e0\ub2e4.';\r\n\/\/ \ub098\ubb47\uc78e\uc774 \ub2e8\ud48d \ub4dc\ub294 \uac00\uc744\uc740 \uc6b0\ub9ac\ub97c \uac10\uc0c1\uc5d0 \uc816\uac8c \ub9cc\ub4e0\ub2e4.\r\necho fixHangulJosa($text);\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud55c\uae00 \ubb38\uc790\uc5f4\uc5d0 \uc774(\uac00), \uc740(\ub294), \uc744(\ub97c) \uc870\uc0ac\uac00 \ud3ec\ud568\ub41c \uacbd\uc6b0 \ub9de\ub294 \uac83\uc73c\ub85c \uace0\uccd0\uc11c \ubc18\ud658\ud558\ub294 \ud568\uc218\ub97c \ub9cc\ub4e4\uc5b4\ubd24\ub2e4. \uc870\uc0ac \uc55e\uae00\uc790\uc758 \ubc1b\uce68 \uc720\ubb34\uc5d0 \ub530\ub77c \uc5b4\ub5a4 \uc870\uc0ac\uac00 \ubd99\uc744\uc9c0 \uc120\ud0dd\ub418\ub294 \uac04\ub2e8\ud55c \ub85c\uc9c1\uc73c\ub85c \ucf54\ub4dc\ub294 \uc9e7\uace0 \ub2e8\uc21c\ud558\ub2e4. &lt;?php function fixHangulJosa(string $text): string { return preg_replace_callback(&#8216;\/ ([\uac00-\ud7a3])( \uc744\\(\ub97c\\) |\uc774\\(\uac00\\) |\uc740\\(\ub294\\) ) \/ux&#8217;, function ($matches) { $coda = (mb_ord($matches[1]) &#8211; 0xAC00) % 28; $start = $coda [&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,"footnotes":""},"categories":[7],"tags":[152],"_links":{"self":[{"href":"https:\/\/ani2life.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1853"}],"collection":[{"href":"https:\/\/ani2life.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ani2life.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ani2life.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ani2life.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1853"}],"version-history":[{"count":2,"href":"https:\/\/ani2life.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1853\/revisions"}],"predecessor-version":[{"id":1855,"href":"https:\/\/ani2life.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1853\/revisions\/1855"}],"wp:attachment":[{"href":"https:\/\/ani2life.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ani2life.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ani2life.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}