{"id":7459,"date":"2019-10-28T05:46:07","date_gmt":"2019-10-28T05:46:07","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=7459"},"modified":"2022-05-08T12:07:22","modified_gmt":"2022-05-08T12:07:22","slug":"php-important-topics-with-example","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/php-important-topics-with-example\/","title":{"rendered":"PHP important topics with example"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>PHP:-<\/strong><\/p>\n\n\n\n<p>Hypertext Preprocessor(Recursive Acronym)<br> Server-Side Programming\/Scripting Language<br> It can be embedded directly within HTML. Files use a \u201c.php\u201d file extension.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/4cc638e62c5690e221bf339830621400.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>PHP Case Sensitivity:-<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/f41e70828a4d45a5ba16cee13bb0af80.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>PHP Comments:-<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/89bcb639e8c3b1621eeef0cd5f494ec3.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>PHP Variables ($):- <\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/6697ed823510cc9dbc5ac887bb95681c.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>PHP echo Statement:-<\/strong><\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/6da0381e5b990407c73fcf55c8f45867.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>PHP Strings (&#8221; &#8220;):-<\/strong><\/p>\n\n\n\n<p>Strings define as (&#8220;DevOpsSchool&#8221;)<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/c5c17c83f58995ba0bb4f92468fa18f7.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>PHP Numbers:-<\/strong><\/p>\n\n\n\n<p>PHP Numbers no need to define Strings or Quote define as 123, 234, 345\u2026\u2026\u2026. etc.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/74c88a693e7b6462f5a7c3616930e463.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>PHP Constants:-<\/strong><\/p>\n\n\n\n<p>PHP Constants like as identifier which simple value. The value cannot be changed as script. no need to sign $ before the constant name<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/861349eb581d75173f8b23859244f282.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>PHP IF\u2026.. Else\u2026..Elseif:-<\/strong><\/p>\n\n\n\n<p>PHP if\u2026\u2026 else\u2026\u2026.. elseif used that time you want to perform different actions for different conditions.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/6178c66cf48f1533f87ceab5c4c09e13.js\"><\/script>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/6c9738d63cbc698a7c349d381a850b2a.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>PHP switch Statement:-<\/strong><\/p>\n\n\n\n<p>PHP switch Statement is used to perform different actions based on different switch cases conditions.Switch statement use one conditions many blocks of code to be executed.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/caccd36efc05a3979efa3edfa72de760.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Ternary or Conditional Operator:-<\/strong><\/p>\n\n\n\n<p>Ternary or Conditional Operator used to similar as if else statement.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/4a8c8343b80f42d8d405f8538d14939e.js\"><\/script>\n\n\n\n<p class=\"has-medium-font-size\"><strong>PHP While Loop:-<\/strong><\/p>\n\n\n\n<p>While Loop keeps repeating any action until all condition returns false.<\/p>\n\n\n\n<script src=\"https:\/\/gist.github.com\/Bitbuckettraining\/e50741f3744ebf33b49232552e4bcb2a.js\"><\/script>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_92815\"><figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube epyt-figure\"><div class=\"wp-block-embed__wrapper\"><iframe loading=\"lazy\"  id=\"_ytid_73759\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_92815\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>PHP:- Hypertext Preprocessor(Recursive Acronym) Server-Side Programming\/Scripting Language It can be embedded directly within HTML. Files use a \u201c.php\u201d file extension. PHP Case Sensitivity:- PHP Comments:- PHP Variables ($):- PHP echo Statement:- PHP Strings (&#8221; &#8220;):- Strings define as (&#8220;DevOpsSchool&#8221;) PHP Numbers:- PHP Numbers no need to define Strings or Quote define as 123, 234, 345\u2026\u2026\u2026&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":7460,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[5150],"tags":[519,2454,177,5485],"class_list":["post-7459","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-example","tag-important","tag-php","tag-topics"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/7459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=7459"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/7459\/revisions"}],"predecessor-version":[{"id":25353,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/7459\/revisions\/25353"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/7460"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=7459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=7459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=7459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}