{"id":9400,"date":"2021-10-05T07:16:03","date_gmt":"2021-10-05T07:16:03","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=9400"},"modified":"2021-10-07T11:31:53","modified_gmt":"2021-10-07T11:31:53","slug":"introduction-to-php","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/","title":{"rendered":"Introduction to PHP OOP"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">What is PHP?<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>PHP stands for hypertext preprocessor.<\/li><li>It is widely used in backend programming language.<\/li><li>PHP programming patterns are procedural\/core php and object oriented.<\/li><li>Lots of framework are use like laravel, CakePHP, Yii, Zend, Codeigniter etc.<\/li><li>Code more modular and reusable. <\/li><li>Well organised code. <\/li><li>Easier to debug.<\/li><li>Best for large website projects.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Why is it so popular ?<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Code reusable<\/li><li>Easier to debug<\/li><li>Best for medium and large website project <\/li><li>Backend programming use <\/li><li>Code more modular <\/li><li>Understanding code easier <\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">What are class and object ? <\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Class are the blueprint of object ; Object use blueprint to build their project or functions.<\/li><li>Class example :- blueprint of house ; Object example :- built house.<\/li><li>Class function one ; Object function are lots that are related to class function.<\/li><li>If there is a function which is written in object but not written in class then that function will not work.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">What is properties and methods ?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>properties like :- <\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$a;\n$b;\n$c;\n$d;\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Methods like :-<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsum(){\n$c=$a+$b;\nreturn $c;\n}\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">Example of PHP :-<\/h3>\n\n\n\n<script src=\"https:\/\/gist.github.com\/vikash-cotocus\/59797cba085894773e599de757ebfa75.js\"><\/script>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"482\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/10\/php1-1024x482.png\" alt=\"\" class=\"wp-image-9401\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/10\/php1-1024x482.png 1024w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/10\/php1-300x141.png 300w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/10\/php1-768x362.png 768w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/10\/php1.png 1421w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>What is PHP? PHP stands for hypertext preprocessor. It is widely used in backend programming language. PHP programming patterns are [&hellip;]<\/p>\n","protected":false},"author":34,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5388],"tags":[1122,373,177,593,6877,213,670,6875,6872,6871,6876,6873,6874],"class_list":["post-9400","post","type-post","status-publish","format-standard","hentry","category-php","tag-guide","tag-perforce","tag-php","tag-process","tag-simple-example-of-php","tag-tutorial","tag-what","tag-what-is-class-and-object","tag-what-is-php-2","tag-what-is-php-in-scmgalaxy","tag-what-is-properties-and-methods","tag-why-is-it-so-popular","tag-why-php-is-so-popular"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Introduction to PHP OOP - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Introduction to PHP OOP - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"What is PHP? PHP stands for hypertext preprocessor. It is widely used in backend programming language. PHP programming patterns are [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-05T07:16:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-07T11:31:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/10\/php1-1024x482.png\" \/>\n<meta name=\"author\" content=\"vikashdev k\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"vikashdev k\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/\"},\"author\":{\"name\":\"vikashdev k\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ec4d1004b3acffc7df65899e880c7515\"},\"headline\":\"Introduction to PHP OOP\",\"datePublished\":\"2021-10-05T07:16:03+00:00\",\"dateModified\":\"2021-10-07T11:31:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/\"},\"wordCount\":163,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/php1-1024x482.png\",\"keywords\":[\"Guide\",\"Perforce\",\"Php\",\"Process\",\"simple example of php\",\"Tutorial\",\"What\",\"what is class and object\",\"what is php\",\"what is php in scmgalaxy\",\"what is properties and methods\",\"why is it so popular\",\"why php is so popular\"],\"articleSection\":[\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/\",\"name\":\"Introduction to PHP OOP - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/php1-1024x482.png\",\"datePublished\":\"2021-10-05T07:16:03+00:00\",\"dateModified\":\"2021-10-07T11:31:53+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ec4d1004b3acffc7df65899e880c7515\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/php1.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/10\\\/php1.png\",\"width\":1421,\"height\":669},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/introduction-to-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Introduction to PHP OOP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ec4d1004b3acffc7df65899e880c7515\",\"name\":\"vikashdev k\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g\",\"caption\":\"vikashdev k\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/vikashdev\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Introduction to PHP OOP - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/","og_locale":"en_US","og_type":"article","og_title":"Introduction to PHP OOP - scmGalaxy","og_description":"What is PHP? PHP stands for hypertext preprocessor. It is widely used in backend programming language. PHP programming patterns are [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/","og_site_name":"scmGalaxy","article_published_time":"2021-10-05T07:16:03+00:00","article_modified_time":"2021-10-07T11:31:53+00:00","og_image":[{"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/10\/php1-1024x482.png","type":"","width":"","height":""}],"author":"vikashdev k","twitter_card":"summary_large_image","twitter_misc":{"Written by":"vikashdev k","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/"},"author":{"name":"vikashdev k","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/ec4d1004b3acffc7df65899e880c7515"},"headline":"Introduction to PHP OOP","datePublished":"2021-10-05T07:16:03+00:00","dateModified":"2021-10-07T11:31:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/"},"wordCount":163,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/10\/php1-1024x482.png","keywords":["Guide","Perforce","Php","Process","simple example of php","Tutorial","What","what is class and object","what is php","what is php in scmgalaxy","what is properties and methods","why is it so popular","why php is so popular"],"articleSection":["php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/","name":"Introduction to PHP OOP - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/10\/php1-1024x482.png","datePublished":"2021-10-05T07:16:03+00:00","dateModified":"2021-10-07T11:31:53+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/ec4d1004b3acffc7df65899e880c7515"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/10\/php1.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/10\/php1.png","width":1421,"height":669},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/introduction-to-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Introduction to PHP OOP"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/ec4d1004b3acffc7df65899e880c7515","name":"vikashdev k","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/738fe2694a5769295d6bbe57066232fcf8351e09ce1090f200c7b34f770fa61b?s=96&d=mm&r=g","caption":"vikashdev k"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/vikashdev\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/9400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=9400"}],"version-history":[{"count":3,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/9400\/revisions"}],"predecessor-version":[{"id":9453,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/9400\/revisions\/9453"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=9400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=9400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=9400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}