{"id":4059,"date":"2022-01-25T15:35:29","date_gmt":"2022-01-25T15:35:29","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=4059"},"modified":"2022-02-17T07:13:46","modified_gmt":"2022-02-17T07:13:46","slug":"global-members-of-a-class","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/php\/classes\/global-members-of-a-class","title":{"rendered":"Global members of a class"},"content":{"rendered":"\n<h5 class=\"wp-block-heading\">Defining static members<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>class MyClass() \n{\r\n  public static $MyStaticPropertyA = 80;\n\n  public static function MyStaticFunction()\n {\r\n\r\n  }\n\n}<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Accessing outside of the class<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>  echo MyClass::$MyStaticPropertyA;\r\n  echo MyClass::MyStaticFunction();<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Defining static members Accessing outside of the class<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[315],"tags":[],"class_list":["post-4059","post","type-post","status-publish","format-standard","hentry","category-classes"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/4059","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=4059"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/4059\/revisions"}],"predecessor-version":[{"id":4060,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/4059\/revisions\/4060"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=4059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=4059"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=4059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}