{"id":369346,"date":"2023-03-01T13:37:50","date_gmt":"2023-03-01T13:37:50","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=369346"},"modified":"2024-06-06T06:37:30","modified_gmt":"2024-06-06T06:37:30","slug":"php-code-execution-flow","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/","title":{"rendered":"PHP Code Execution Flow"},"content":{"rendered":"\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h3 class=\"wp-block-heading index-title\">Introduction:<\/h3>\n<\/div><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>PHP<\/strong> stands for Hypertext PreProcessor. <\/li>\n\n\n\n<li>It is the most extensively used open-source and general-purpose server-side scripting language. <\/li>\n\n\n\n<li>PHP is substantially used in web development to produce dynamic websites and applications.<\/li>\n\n\n\n<li>It is also used to make numerous Content Management Systems ( CMS ) like WordPress, WooCommerce, etc.<\/li>\n\n\n\n<li>The PHP file should be saved with the extension &#8220;.php&#8221;. For more information go to <a href=\"https:\/\/www.w3schools.com\/php\/\" target=\"_blank\" rel=\"noreferrer noopener\">this<\/a>.<\/li>\n<\/ul>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h3 class=\"wp-block-heading index-title\">The Step-By-Step Procedure to run a PHP file on Ubuntu:<\/h3>\n<\/div><\/div>\n\n\n\n<p>To run a PHP application on Ubuntu system we need to install the following software:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apache2 Server<\/li>\n\n\n\n<li>PHP<\/li>\n\n\n\n<li>MySQLphpMyAdmin<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Apache2 server Installation:<\/h3>\n\n\n\n<p>We can install the Apache2 server by using the below command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">sudo apt-get install apache2<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">PHP Installation:<\/h3>\n\n\n\n<p>Execute the following command in the terminal to install the latest version of PHP:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">sudo apt install php<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">MySQL Installation:<\/h3>\n\n\n\n<p>If we are working with a database then we require a database server on our computer. MySQL is the most popular database with PHP. It can be set up using the below command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">sudo apt-get install mysql-server mysql-client\nsudo mysql_secure_installation<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\">Enter current password for root (enter for none): (Press Enter)\nSet root password? &#091;Y\/n]: Y\nNew password: (Enter password for MySQL Database)\nRe-enter new password: (Repeat password)\nRemove anonymous users? &#091;Y\/n]: Y\nDisallow root login remotely? &#091;Y\/n]: Y\nRemove test database and access to it? &#091;Y\/n]:  Y\nReload privilege tables now? &#091;Y\/n]:  Y<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">phpMyAdmin Installation:<\/h3>\n\n\n\n<p>The purpose of the installation of phpMyAdmin is to handle the administration of MySQL database over the web. phpMyAdmin is a graphical user interface for running MySQL.<\/p>\n\n\n\n<p>We can install it by using the below command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">sudo apt-get install phpmyadmin<\/pre>\n\n\n\n<p>After Installation, let\u2019s move ahead to see how to run a PHP script on Ubuntu system.<\/p>\n\n\n\n<p>Now, to run a PHP script:<\/p>\n\n\n\n<p>1. Go to \u201cHome\/www\/html\u201d and inside it, we create a folder named \u201cTest\u201d. It\u2019s good practice to create a new folder for every project you work on. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"580\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564-1200x580.jpg\" alt=\"Test Directory.\" class=\"wp-image-371379\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564-1200x580.jpg 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564-300x145.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564-250x121.jpg 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564-768x371.jpg 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564.jpg 1332w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>2. Inside the Test folder, we create a new file named \u201cindex.php\u201d and write the following script.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n    echo &quot;Welcome to My Blog!!&quot;;\n?&gt;<\/pre>\n\n\n\n<p>3. Next, open <strong>Terminal<\/strong> and type the following command to restart the Apache2 server.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">sudo \/etc\/init.d\/apache2 restart<\/pre>\n\n\n\n<p>4. After this, we can see the output of the PHP file on the browser. For this, go to a browser and in the address bar, type &#8220;localhost\/Test\/&#8221; and now we can see the below output:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"490\" height=\"142\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/pot.jpg\" alt=\"The output image of PHP program.\" class=\"wp-image-371389\" style=\"width:818px;height:237px\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/pot.jpg 490w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/pot-300x87.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/pot-250x72.jpg 250w\" sizes=\"(max-width: 490px) 100vw, 490px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<div class=\"wk-index-wrap\"><div class=\"block-wrap\">\n<h3 class=\"wp-block-heading index-title\">The Flow of PHP Code Execution from Server to Browser:<\/h3>\n<\/div><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>For the execution of PHP files, we have an interpreter called &#8220;PHP Interpreter&#8221;. It is based on the Zend engine. Zend engine compiled the PHP Script into Zend Opcodes.<\/li>\n\n\n\n<li>Opcodes are short for Operation codes. It is low-level binary instructions.<\/li>\n\n\n\n<li>These Opcodes are executed and HTML is sent to the client i.e browser.<\/li>\n\n\n\n<li>We need HTTP Protocol to accept the request and send the response to the browser.<\/li>\n<\/ul>\n\n\n\n<p>The following diagram will help you better to understand how the PHP code actually executes till the browser: <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"399\" height=\"334\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/z8-1.jpg\" alt=\"PHP Code Execution.\" class=\"wp-image-370507\" style=\"width:821px;height:687px\" title=\"\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/z8-1.jpg 399w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/z8-1-300x251.jpg 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/z8-1-250x209.jpg 250w\" sizes=\"(max-width: 399px) 100vw, 399px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>The PHP Interpreter undergoes the following four phases:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Lexing<\/li>\n\n\n\n<li>Parsing<\/li>\n\n\n\n<li>Compilation<\/li>\n\n\n\n<li>Interpretation<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">1. Lexing:<\/h3>\n\n\n\n<p>Lexing is the process of converting the PHP source code into tokens. A token in a named identifier for the value. <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">$code = &lt;&lt;&lt;&#039;code&#039;\n&lt;?php\n$x = 5;\ncode;\n\n$tokens = token_get_all($code);\n\nforeach ($tokens as $token) {\n    if (is_array($token)) {\n        echo &quot;Line {$token&#091;2]}: &quot;, token_name($token&#091;0]), &quot; (&#039;{$token&#091;1]}&#039;)&quot;, PHP_EOL;\n    } else {\n        var_dump($token);\n    }\n}<\/pre>\n\n\n\n<p>Output:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1102\" height=\"638\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/outputcode-.png\" alt=\"Output of Lexing.\" class=\"wp-image-371063\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/outputcode-.png 1102w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/outputcode--300x174.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/outputcode--250x145.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/outputcode--768x445.png 768w\" sizes=\"(max-width: 1102px) 100vw, 1102px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>From the above output, we can understand that not all pieces of the source code are tokens. Except this, some symbols are named tokens ( i.e. <code>=<\/code>, <code>;<\/code>, <code>:<\/code>,&nbsp;<code>?<\/code>, etc).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Parsing:<\/h3>\n\n\n\n<p>Parsing is the process of recognizing tokens within a data instance and looking for recognizable patterns. The parser takes the tokens from the lexer as input and it has two tasks.<\/p>\n\n\n\n<p>First, it validates the token, and second, the parser produces the Abstract Syntax Tree( AST ) i.e a tree representation of the source code.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">$code = &lt;&lt;&lt;&#039;code&#039;\n&lt;?php\n$x = 1;\ncode;\n\nprint_r(ast\\parse_code($code, 30));<\/pre>\n\n\n\n<p>Output:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"759\" height=\"1024\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/parsing-1-759x1024.png\" alt=\"PHP Parsing.\" class=\"wp-image-371177\" style=\"width:819px;height:1105px\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/parsing-1-759x1024.png 759w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/parsing-1-222x300.png 222w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/parsing-1-185x249.png 185w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/parsing-1-768x1036.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/parsing-1.png 952w\" sizes=\"(max-width: 759px) 100vw, 759px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">3. Compilation:<\/h3>\n\n\n\n<p>In this phase, the Abstract Syntax Tree( AST ) will be converted into Opcodes. Also, Optimization is performed here (such as resolving some function calls, etc ). <\/p>\n\n\n\n<p>Create a new file suppose &#8220;myfile.php&#8221; and write the following code in this file.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">if ( &#039;7.1.0-dev&#039; ===  PHP_VERSION) {\n    echo &#039;Hii&#039;, PHP_EOL;\n}<\/pre>\n\n\n\n<p>Execute the following command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">php -dopcache.enable_cli=1 -dopcache.optimization_level=0 -dvld.active=1 -dvld.execute=0 myfile.php<\/pre>\n\n\n\n<p>After executing the above command, we can see the below output:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"394\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/compilation-1-1-1200x394.png\" alt=\"PHP Compilation.\" class=\"wp-image-371208\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/compilation-1-1-1200x394.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/compilation-1-1-300x98.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/compilation-1-1-250x82.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/compilation-1-1-768x252.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/compilation-1-1-1536x504.png 1536w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/compilation-1-1.png 1712w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">4. Interpretation:<\/h3>\n\n\n\n<p>Here, the opcodes are run on the Zend Engine and HTML is generated as output. This output will show on the browser. <\/p>\n\n\n\n<p>If you need custom\u00a0<a href=\"https:\/\/webkul.com\/wordpress-theme-development-services\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress Development services<\/a>\u00a0then feel free to\u00a0<a href=\"https:\/\/webkul.com\/contacts\" target=\"_blank\" rel=\"noreferrer noopener\">reach us<\/a>.<\/p>\n\n\n\n<p>!!Have a Great Day Ahead!!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To run a PHP application on Ubuntu system we need to install the following software: Apache2 server Installation: We can install the Apache2 server by using the below command: PHP Installation: Execute the following command in the terminal to install the latest version of PHP: MySQL Installation: If we are working with a database then <a href=\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":505,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1260],"tags":[1258,13679,1501],"class_list":["post-369346","post","type-post","status-publish","format-standard","hentry","category-php","category-wordpress","tag-wordpress","tag-wordpress-development-services","tag-wordpress-plugin"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP Code Execution Flow - Webkul Blog<\/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:\/\/webkul.com\/blog\/php-code-execution-flow\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP Code Execution Flow - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"To run a PHP application on Ubuntu system we need to install the following software: Apache2 server Installation: We can install the Apache2 server by using the below command: PHP Installation: Execute the following command in the terminal to install the latest version of PHP: MySQL Installation: If we are working with a database then [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-01T13:37:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-06-06T06:37:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564-1200x580.jpg\" \/>\n<meta name=\"author\" content=\"Raushan Kumar Paswan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Raushan Kumar Paswan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/\"},\"author\":{\"name\":\"Raushan Kumar Paswan\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/db36277344bb56e4917bf0211aec8793\"},\"headline\":\"PHP Code Execution Flow\",\"datePublished\":\"2023-03-01T13:37:50+00:00\",\"dateModified\":\"2024-06-06T06:37:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/\"},\"wordCount\":630,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564-1200x580.jpg\",\"keywords\":[\"wordpress\",\"wordpress development services\",\"wordpress plugin\"],\"articleSection\":[\"php\",\"WordPress\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/\",\"url\":\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/\",\"name\":\"PHP Code Execution Flow - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564-1200x580.jpg\",\"datePublished\":\"2023-03-01T13:37:50+00:00\",\"dateModified\":\"2024-06-06T06:37:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564.jpg\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564.jpg\",\"width\":1332,\"height\":644,\"caption\":\"tuxpi.com_.1677674564\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP Code Execution Flow\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/db36277344bb56e4917bf0211aec8793\",\"name\":\"Raushan Kumar Paswan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ce9851ee21ba1ce546af25d566be4dffeaa3d4f8a1be72688619265ad326a321?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ce9851ee21ba1ce546af25d566be4dffeaa3d4f8a1be72688619265ad326a321?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Raushan Kumar Paswan\"},\"description\":\"Raushan specializes in WordPress SaaS Development and Shipping Method services, delivering scalable solutions that streamline eCommerce operations. Expertise drives enhanced digital presence and empowers businesses to achieve sustained growth.\",\"url\":\"https:\/\/webkul.com\/blog\/author\/raushankrpaswan-wp333\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP Code Execution Flow - Webkul Blog","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:\/\/webkul.com\/blog\/php-code-execution-flow\/","og_locale":"en_US","og_type":"article","og_title":"PHP Code Execution Flow - Webkul Blog","og_description":"To run a PHP application on Ubuntu system we need to install the following software: Apache2 server Installation: We can install the Apache2 server by using the below command: PHP Installation: Execute the following command in the terminal to install the latest version of PHP: MySQL Installation: If we are working with a database then [...]","og_url":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-03-01T13:37:50+00:00","article_modified_time":"2024-06-06T06:37:30+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564-1200x580.jpg","type":"","width":"","height":""}],"author":"Raushan Kumar Paswan","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Raushan Kumar Paswan","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/"},"author":{"name":"Raushan Kumar Paswan","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/db36277344bb56e4917bf0211aec8793"},"headline":"PHP Code Execution Flow","datePublished":"2023-03-01T13:37:50+00:00","dateModified":"2024-06-06T06:37:30+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/"},"wordCount":630,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564-1200x580.jpg","keywords":["wordpress","wordpress development services","wordpress plugin"],"articleSection":["php","WordPress"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/php-code-execution-flow\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/","url":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/","name":"PHP Code Execution Flow - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564-1200x580.jpg","datePublished":"2023-03-01T13:37:50+00:00","dateModified":"2024-06-06T06:37:30+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/php-code-execution-flow\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564.jpg","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/03\/tuxpi.com_.1677674564.jpg","width":1332,"height":644,"caption":"tuxpi.com_.1677674564"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/php-code-execution-flow\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PHP Code Execution Flow"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/db36277344bb56e4917bf0211aec8793","name":"Raushan Kumar Paswan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ce9851ee21ba1ce546af25d566be4dffeaa3d4f8a1be72688619265ad326a321?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ce9851ee21ba1ce546af25d566be4dffeaa3d4f8a1be72688619265ad326a321?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Raushan Kumar Paswan"},"description":"Raushan specializes in WordPress SaaS Development and Shipping Method services, delivering scalable solutions that streamline eCommerce operations. Expertise drives enhanced digital presence and empowers businesses to achieve sustained growth.","url":"https:\/\/webkul.com\/blog\/author\/raushankrpaswan-wp333\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/369346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/505"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=369346"}],"version-history":[{"count":42,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/369346\/revisions"}],"predecessor-version":[{"id":445973,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/369346\/revisions\/445973"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=369346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=369346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=369346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}