{"id":10871,"date":"2022-06-08T20:55:29","date_gmt":"2022-06-08T17:55:29","guid":{"rendered":"https:\/\/elzero.org\/?p=10871"},"modified":"2022-08-07T07:54:41","modified_gmt":"2022-08-07T04:54:41","slug":"php-implement-string-length-function","status":"publish","type":"post","link":"https:\/\/elzero.org\/old\/php-implement-string-length-function\/","title":{"rendered":"Implement String Length Function"},"content":{"rendered":"<h3>\u0645\u062d\u062a\u0648\u0649 \u0627\u0644\u062f\u0631\u0633<\/h3>\r\n\r\n<script type=\"text\/plain\" class=\"language-php\">\r\n<?php\r\n\r\n  function elzero_string_length(string $str) : int {\r\n    $count = 0;\r\n    while (!empty($str[$count])) $count++;\r\n    return $count;\r\n  }\r\n\r\n  echo elzero_string_length(\"\") . \"<br>\";\r\n  echo elzero_string_length(\"Elzero\") . \"<br>\";\r\n  echo elzero_string_length(\"Elzero Web\") . \"<br>\";\r\n<\/script>","protected":false},"excerpt":{"rendered":"<p>\u0645\u062d\u062a\u0648\u0649 \u0627\u0644\u062f\u0631\u0633<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1156],"tags":[],"class_list":["post-10871","post","type-post","status-publish","format-standard","hentry","category-functions-implement"],"_links":{"self":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/10871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/comments?post=10871"}],"version-history":[{"count":2,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/10871\/revisions"}],"predecessor-version":[{"id":11695,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/10871\/revisions\/11695"}],"wp:attachment":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/media?parent=10871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/categories?post=10871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/tags?post=10871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}