{"id":207,"date":"2024-03-01T16:31:57","date_gmt":"2024-03-01T16:31:57","guid":{"rendered":"https:\/\/www.xopsschool.com\/tutorials\/?p=207"},"modified":"2024-03-01T17:34:06","modified_gmt":"2024-03-01T17:34:06","slug":"what-is-php","status":"publish","type":"post","link":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/","title":{"rendered":"What is PHP ?"},"content":{"rendered":"\n<p>Php is Hypertext Preprocessor is a widely used open-source server side scripting language. It allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications. Php Code is executed in servers, that is why you\u2019ll have to install a sever-like environment enabled by programs like XAMPP which is an Apache distribution.<br>1994, Rasmus Lerdorf unleashed the very first version of PHP.<br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"467\" src=\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1-1024x467.png\" alt=\"\" class=\"wp-image-210\" srcset=\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1-1024x467.png 1024w, https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1-300x137.png 300w, https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1-768x350.png 768w, https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1.png 1228w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Where is PHP used.<\/h2>\n\n\n\n<p>Three are the main areas where PHP scripts are used<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Server-side scripting<\/li>\n\n\n\n<li>Command line scripting<\/li>\n\n\n\n<li>Writing desktop applications<\/li>\n<\/ul>\n\n\n\n<p><strong>Server-side scripting<\/strong><\/p>\n\n\n\n<p>This is the most used and main target for PHP. You need three things to make this work the way you need it. The PHP a web server and a web browser. You need to run the web server where. You can access the PHP program output with a web browser, viewing the PHP page through the server.<\/p>\n\n\n\n<p><strong>Command line scripting<\/strong> <\/p>\n\n\n\n<p>PHP script to run it without any server or browser. You only need the PHP parser to use it this way. This type of usage is ideal for scripts regularly executed using cron on Linux or Task Scheduler on Windows. These scripts can also be used for simple text processing tasks.<\/p>\n\n\n\n<p><strong>Writing desktop applications<\/strong><\/p>\n\n\n\n<p>PHP may not the very best language to create a desktop application with a graphical user interface, but if you know PHP very well, and would like to use some advanced PHP features in your client side  applications you can also use PHP-GTK to write such programs. You also have the ability to write cross-platform applications this way.<br><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Example<\/strong>  <\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"365\" height=\"304\" src=\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/Screenshot-57.png\" alt=\"\" class=\"wp-image-211\" srcset=\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/Screenshot-57.png 365w, https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/Screenshot-57-300x250.png 300w\" sizes=\"auto, (max-width: 365px) 100vw, 365px\" \/><\/figure>\n\n\n\n<p><strong>How to Use PHP?<\/strong><\/p>\n\n\n\n<p>There are three major things needed to code effectively in PHP<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>PHP Parser<\/strong><\/li>\n\n\n\n<li><strong>Web Server<\/strong><\/li>\n\n\n\n<li><strong>Web Browser<\/strong><br><\/li>\n<\/ul>\n\n\n\n<p><strong>1. PHP Parser: <\/strong>The parser takes PHP code and analyses it, outputting a respective syntax tree that puts the source into an easier to read format for machines to understand.<\/p>\n\n\n\n<p><strong>2. Web Server:<\/strong> The server is the program that will execute your PHP files to form webpages<\/p>\n\n\n\n<p><strong>3. Web Browser: <\/strong>The browser will allow you to view the PHP page through the server, in the same way as with any other content on the web<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Who uses PHP?<\/h2>\n\n\n\n<p>PHP has been around for quite some time, it is still used among some of the world\u2019s most well-known organisations and websites. Below are just a few of the companies that use it.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Facebook<\/li>\n\n\n\n<li>Wikipedia<\/li>\n\n\n\n<li>WordPress<\/li>\n\n\n\n<li>Etsy<\/li>\n\n\n\n<li>Slack<\/li>\n<\/ul>\n\n\n\n<p>\u00a0PHP is still a useful investment for developers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Basic Structure of PHP<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"547\" src=\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/basic-structure-2-1024x547-1.jpg\" alt=\"\" class=\"wp-image-212\" style=\"width:647px;height:auto\" srcset=\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/basic-structure-2-1024x547-1.jpg 1024w, https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/basic-structure-2-1024x547-1-300x160.jpg 300w, https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/basic-structure-2-1024x547-1-768x410.jpg 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Basic Structure of PHP<\/strong><br><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html>\r\n&lt;html>\r\n&lt;body>\r\n    &lt;h1>wizbrand&lt;\/h1>\r\n\r\n    &lt;?php\r\n        echo 'wizbrand';\r\n    ?>\r\n&lt;\/body>\r\n&lt;\/html>\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Php is Hypertext Preprocessor is a widely used open-source server side scripting language. It allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications. Php Code is executed in servers, that is why you\u2019ll have to install a sever-like environment enabled by programs like &#8230; <a title=\"What is PHP ?\" class=\"read-more\" href=\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/\" aria-label=\"Read more about What is PHP ?\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-207","post","type-post","status-publish","format-standard","hentry","category-php-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is PHP ? - XOps Tutorials!!!<\/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.xopsschool.com\/tutorials\/what-is-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is PHP ? - XOps Tutorials!!!\" \/>\n<meta property=\"og:description\" content=\"Php is Hypertext Preprocessor is a widely used open-source server side scripting language. It allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications. Php Code is executed in servers, that is why you\u2019ll have to install a sever-like environment enabled by programs like ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/\" \/>\n<meta property=\"og:site_name\" content=\"XOps Tutorials!!!\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-01T16:31:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-01T17:34:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1-1024x467.png\" \/>\n<meta name=\"author\" content=\"ritik hansda\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ritik hansda\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/\"},\"author\":{\"name\":\"ritik hansda\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7\"},\"headline\":\"What is PHP ?\",\"datePublished\":\"2024-03-01T16:31:57+00:00\",\"dateModified\":\"2024-03-01T17:34:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/\"},\"wordCount\":423,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1-1024x467.png\",\"articleSection\":[\"PHP Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/\",\"name\":\"What is PHP ? - XOps Tutorials!!!\",\"isPartOf\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1-1024x467.png\",\"datePublished\":\"2024-03-01T16:31:57+00:00\",\"dateModified\":\"2024-03-01T17:34:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#primaryimage\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1.png\",\"contentUrl\":\"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1.png\",\"width\":1228,\"height\":560},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.xopsschool.com\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is PHP ?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#website\",\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/\",\"name\":\"XOps Tutorials!!!\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7\",\"name\":\"ritik hansda\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g\",\"caption\":\"ritik hansda\"},\"url\":\"https:\/\/www.xopsschool.com\/tutorials\/author\/ritikhansda\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is PHP ? - XOps Tutorials!!!","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.xopsschool.com\/tutorials\/what-is-php\/","og_locale":"en_US","og_type":"article","og_title":"What is PHP ? - XOps Tutorials!!!","og_description":"Php is Hypertext Preprocessor is a widely used open-source server side scripting language. It allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications. Php Code is executed in servers, that is why you\u2019ll have to install a sever-like environment enabled by programs like ... Read more","og_url":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/","og_site_name":"XOps Tutorials!!!","article_published_time":"2024-03-01T16:31:57+00:00","article_modified_time":"2024-03-01T17:34:06+00:00","og_image":[{"url":"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1-1024x467.png","type":"","width":"","height":""}],"author":"ritik hansda","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ritik hansda","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#article","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/"},"author":{"name":"ritik hansda","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7"},"headline":"What is PHP ?","datePublished":"2024-03-01T16:31:57+00:00","dateModified":"2024-03-01T17:34:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/"},"wordCount":423,"commentCount":0,"image":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1-1024x467.png","articleSection":["PHP Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/","url":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/","name":"What is PHP ? - XOps Tutorials!!!","isPartOf":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#primaryimage"},"image":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1-1024x467.png","datePublished":"2024-03-01T16:31:57+00:00","dateModified":"2024-03-01T17:34:06+00:00","author":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7"},"breadcrumb":{"@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#primaryimage","url":"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1.png","contentUrl":"https:\/\/www.xopsschool.com\/tutorials\/wp-content\/uploads\/2024\/03\/1.png","width":1228,"height":560},{"@type":"BreadcrumbList","@id":"https:\/\/www.xopsschool.com\/tutorials\/what-is-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.xopsschool.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"What is PHP ?"}]},{"@type":"WebSite","@id":"https:\/\/www.xopsschool.com\/tutorials\/#website","url":"https:\/\/www.xopsschool.com\/tutorials\/","name":"XOps Tutorials!!!","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.xopsschool.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/c0119ddd2d27ea9cd476e809c8294ba7","name":"ritik hansda","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.xopsschool.com\/tutorials\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6fe0bc437410899c524975272622377e50e726108b1ad03f7b4488f734304fce?s=96&d=mm&r=g","caption":"ritik hansda"},"url":"https:\/\/www.xopsschool.com\/tutorials\/author\/ritikhansda\/"}]}},"_links":{"self":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/comments?post=207"}],"version-history":[{"count":3,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/207\/revisions"}],"predecessor-version":[{"id":214,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/posts\/207\/revisions\/214"}],"wp:attachment":[{"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/media?parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/categories?post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xopsschool.com\/tutorials\/wp-json\/wp\/v2\/tags?post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}