{"id":1147,"date":"2021-07-21T13:27:56","date_gmt":"2021-07-21T13:27:56","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=1147"},"modified":"2021-09-08T11:37:23","modified_gmt":"2021-09-08T11:37:23","slug":"how-to-run-php-in-command-line","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/","title":{"rendered":"How to run PHP in command line ?"},"content":{"rendered":"<div class=\"row\">\n<div class=\"col-sm-12\">\n<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"how-to-run-php-in-command-line\" class=\"color-pink\" style=\"text-align: justify;\">How to run PHP in command line ?<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>PHP is a server side scripting language, a lot of development using PHP is done on a live web environment. However, PHP does allow you to install it and run scripts on your local machine with no web access needed.<\/li>\n<li>Running PHP from Windows command line can be especially useful when trying to rapidly develop custom scripts, or to read and modify local files.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"subheading\" style=\"text-align: justify;\">\n<h2 id=\"step-1\">Step 1<\/h2>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>First you will need download the latest version of PHP and extract it to your C:\\ directory.<\/li>\n<li>https:\/\/windows.php.net\/download#php-5.6<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"ImageContent\" style=\"text-align: justify;\">\n<div class=\"hddn\"><a href=\"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-1.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-1.png\" alt=\"how to run php in command line\" width=\"677\" height=\"112\" \/><\/a><\/div>\n<\/div>\n<div class=\"subheading\" style=\"text-align: justify;\">\n<h2 id=\"step-2\">Step 2<\/h2>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Navigate to Control Panel > System and Security > System > Advanced system settings. In the System variables panel click, find and edit the Path variable and append the path to your extracted PHP folder.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"CodeContent\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<figure class=\"highlight\">\n<pre><code id=\"code1\" class=\"hljs css\" data-lang=\"\"><span class=\"nt\"><span class=\"hljs-tag\">C<\/span>:\\<span class=\"hljs-attr_selector\">[php folder]<\/span><\/span><\/code><\/pre>\n<\/figure>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<p>Note: Use semicolon to delimit between System Variables.<\/p>\n<\/div>\n<\/div>\n<div class=\"ImageContent\" style=\"text-align: justify;\">\n<div class=\"hddn\"><img decoding=\"async\" class=\"alignnone size-medium aligncenter\" src=\"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-2.png\" alt=\"how to run php in command line\" width=\"453\" height=\"289\" \/><\/div>\n<\/div>\n<div class=\"subheading\" style=\"text-align: justify;\">\n<h2 id=\"step-3\">Step 3<\/h2>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Open the CMD and enter PATH. Verify your PHP System Variable has been added. (Optional)<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-medium aligncenter\" src=\"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-3.png\" alt=\"how to run php in command line\" width=\"817\" height=\"126\" \/><\/p>\n<\/div>\n<\/div>\n<div class=\"subheading\" style=\"text-align: justify;\">\n<h2 id=\"step-4\">Step 4<\/h2>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Type \u201ccd C:\\[folder name]\u201d in CMD to enter your PHP directory. Replace [folder name] with the name of your extracted PHP download.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"subheading\" style=\"text-align: justify;\">\n<h2 id=\"step-5\">Step 5<\/h2>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Type \u201cphp -v\u201d to confirm version is correct.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"ImageContent\" style=\"text-align: justify;\">\n<div class=\"hddn\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium aligncenter\" src=\"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-4.png\" alt=\"how to run php in command line\" width=\"516\" height=\"134\" \/><\/div>\n<\/div>\n<div class=\"subheading\" style=\"text-align: justify;\">\n<h2 id=\"step-6\">Step 6<\/h2>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Enter \u201cphp c:\\[directory]\\[folder]\\[php function].php\u201d. Replace [php function] with your file.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"ImageContent\">\n<div class=\"hddn\" style=\"text-align: justify;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-5.png\" width=\"565\" height=\"67\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer : PHP is a server side scripting language, a lot of development using PHP&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8182],"tags":[5432,8217,195,491,7383,7352,199,214,8324,198,5940,290,205,8333,8319,8216,8329,8338,8330,196,212,7677,5941,215,207,8214,204,8325,8343,8350,8349,8347,8336,8344,8342,8341,8339,8351,8322,8334,8346,8332,8320,8337,8348,8340,8352,8345,8335,8328,8331,8327,208,1744,8321,8326,8318,8323,8215,200,197,284,280,216,15909],"class_list":["post-1147","post","type-post","status-publish","format-standard","hentry","category-php","tag-3i-infotech-limited-interview-questions-and-answers","tag-accel-frontline-ltd-interview-questions-and-answers","tag-accenture-interview-questions-and-answers","tag-applied-materials-interview-questions-and-answers","tag-brillio-technologies-pvt-ltd-interview-questions-and-answers","tag-cactus-communications-interview-questions-and-answers","tag-casting-networks-india-pvt-limited-interview-questions-and-answers","tag-cgi-group-inc-interview-questions-and-answers","tag-check-php-command-line","tag-chetu-interview-questions-and-answers","tag-csg-international-interview-questions-and-answers","tag-cybage-interview-questions-and-answers","tag-dell-international-services-india-pvt-ltd-interview-questions-and-answers","tag-execute-php-file-from-command-line","tag-execute-php-file-from-command-line-linux","tag-harbinger-systems-interview-questions-and-answers","tag-how-to-run-php-in-kali-linux","tag-how-to-run-php-on-windows","tag-how-to-run-php-program-in-linux","tag-ibm-interview-questions-and-answers","tag-indecomm-global-services-interview-questions-and-answers","tag-info-edge-interview-questions-and-answers","tag-infogain-interview-questions-and-answers","tag-maintec-technologies-pvt-ltd-interview-questions-and-answers","tag-mphasis-interview-questions-and-answers","tag-net-solutions-interview-questions-and-answers","tag-oracle-corporation-interview-questions-and-answers","tag-php-7-command-linerun-php-in-terminal-macexecute-php-script-from-command-line-linux","tag-php-cli","tag-php-cli-command","tag-php-cli-example","tag-php-cli-execute-code","tag-php-cli-install","tag-php-cli-windows","tag-php-cmd","tag-php-command","tag-php-command-line","tag-php-command-line-args","tag-php-command-line-arguments","tag-php-command-line-input","tag-php-command-line-interface","tag-php-command-line-options","tag-php-command-line-script","tag-php-command-line-windows","tag-php-command-prompt","tag-php-console","tag-php-console-application","tag-php-console-output","tag-php-execute-command-line","tag-php-execute-shell-script","tag-php-linux-commandphp-exe-location-in-windows-xampp","tag-php-terminal","tag-prokarma-softech-pvt-ltd-interview-questions-and-answers","tag-raqmiyat-information-technologies-pvt-ltd-interview-questions-and-answers","tag-run-php-as-a-service","tag-run-php-from-command-line","tag-run-php-from-command-line-windows-xampp","tag-run-php-from-terminal","tag-sopra-steria-interview-questions-and-answers","tag-tech-mahindra-interview-questions-and-answers","tag-unitedhealth-group-interview-questions-and-answers","tag-valuelabs-interview-questions-and-answers","tag-virtusa-consulting-services-pvt-ltd-interview-questions-and-answers","tag-wipro-interview-questions-and-answers","tag-xtreeme-interview-questions-and-answers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to run PHP in command line ? - PHP Interview Questions - Wikitechy<\/title>\n<meta name=\"description\" content=\"How to run PHP in command line ? - Start a command prompt (Start button &gt; Run &gt; cmd.exe)In the window that appears, type the full path to the PHP executable\" \/>\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.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to run PHP in command line ? - PHP Interview Questions - Wikitechy\" \/>\n<meta property=\"og:description\" content=\"How to run PHP in command line ? - Start a command prompt (Start button &gt; Run &gt; cmd.exe)In the window that appears, type the full path to the PHP executable\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-21T13:27:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-08T11:37:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-1.png\" \/>\n<meta name=\"author\" content=\"Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Editor\" \/>\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.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line\\\/\"},\"author\":{\"name\":\"Editor\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"headline\":\"How to run PHP in command line ?\",\"datePublished\":\"2021-07-21T13:27:56+00:00\",\"dateModified\":\"2021-09-08T11:37:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line\\\/\"},\"wordCount\":210,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line-1.png\",\"keywords\":[\"3i Infotech Limited interview questions and answers\",\"Accel Frontline Ltd interview questions and answers\",\"Accenture interview questions and answers\",\"Applied Materials interview questions and answers\",\"Brillio Technologies Pvt Ltd interview questions and answers\",\"Cactus Communications interview questions and answers\",\"CASTING NETWORKS INDIA PVT LIMITED interview questions and answers\",\"CGI Group Inc interview questions and answers\",\"check php command line\",\"Chetu interview questions and answers\",\"CSG International interview questions and answers\",\"Cybage interview questions and answers\",\"Dell International Services India Pvt Ltd interview questions and answers\",\"execute php file from command line\",\"execute php file from command line linux\",\"Harbinger Systems interview questions and answers\",\"how to run php in kali linux\",\"how to run php on windows\",\"how to run php program in linux\",\"IBM interview questions and answers\",\"Indecomm Global Services interview questions and answers\",\"Info Edge interview questions and answers\",\"Infogain interview questions and answers\",\"Maintec Technologies Pvt Ltd interview questions and answers\",\"Mphasis interview questions and answers\",\"Net Solutions interview questions and answers\",\"Oracle Corporation interview questions and answers\",\"php 7 command linerun php in terminal macexecute php script from command line linux\",\"php cli\",\"php cli command\",\"php cli example\",\"php cli execute code\",\"php cli install\",\"php cli windows\",\"php cmd\",\"php command\",\"php command line\",\"php command line args\",\"php command line arguments\",\"php command line input\",\"php command line interface\",\"php command line options\",\"php command line script\",\"php command line windows\",\"php command prompt\",\"php console\",\"php console application\",\"php console output\",\"php execute command line\",\"php execute shell script\",\"php linux commandphp.exe location in windows xampp\",\"php terminal\",\"Prokarma Softech Pvt Ltd interview questions and answers\",\"Raqmiyat Information Technologies Pvt Ltd interview questions and answers\",\"run php as a service\",\"run php from command line\",\"run php from command line windows xampp\",\"run php from terminal\",\"Sopra Steria interview questions and answers\",\"Tech Mahindra interview questions and answers\",\"UnitedHealth Group interview questions and answers\",\"ValueLabs interview questions and answers\",\"Virtusa Consulting Services Pvt Ltd interview questions and answers\",\"Wipro interview questions and answers\",\"xtreeme interview questions and answers\"],\"articleSection\":[\"PHP\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line\\\/\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line\\\/\",\"name\":\"How to run PHP in command line ? - PHP Interview Questions - Wikitechy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line-1.png\",\"datePublished\":\"2021-07-21T13:27:56+00:00\",\"dateModified\":\"2021-09-08T11:37:23+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"How to run PHP in command line ? - Start a command prompt (Start button > Run > cmd.exe)In the window that appears, type the full path to the PHP executable\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line-1.png\",\"contentUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/php\\\/how-to-run-php-in-command-line-1.png\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\",\"name\":\"Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"caption\":\"Editor\"},\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/author\\\/editor\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to run PHP in command line ? - PHP Interview Questions - Wikitechy","description":"How to run PHP in command line ? - Start a command prompt (Start button > Run > cmd.exe)In the window that appears, type the full path to the PHP executable","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.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/","og_locale":"en_US","og_type":"article","og_title":"How to run PHP in command line ? - PHP Interview Questions - Wikitechy","og_description":"How to run PHP in command line ? - Start a command prompt (Start button > Run > cmd.exe)In the window that appears, type the full path to the PHP executable","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/","og_site_name":"Wikitechy","article_published_time":"2021-07-21T13:27:56+00:00","article_modified_time":"2021-09-08T11:37:23+00:00","og_image":[{"url":"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-1.png","type":"","width":"","height":""}],"author":"Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Editor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/#article","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/"},"author":{"name":"Editor","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"headline":"How to run PHP in command line ?","datePublished":"2021-07-21T13:27:56+00:00","dateModified":"2021-09-08T11:37:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/"},"wordCount":210,"commentCount":0,"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-1.png","keywords":["3i Infotech Limited interview questions and answers","Accel Frontline Ltd interview questions and answers","Accenture interview questions and answers","Applied Materials interview questions and answers","Brillio Technologies Pvt Ltd interview questions and answers","Cactus Communications interview questions and answers","CASTING NETWORKS INDIA PVT LIMITED interview questions and answers","CGI Group Inc interview questions and answers","check php command line","Chetu interview questions and answers","CSG International interview questions and answers","Cybage interview questions and answers","Dell International Services India Pvt Ltd interview questions and answers","execute php file from command line","execute php file from command line linux","Harbinger Systems interview questions and answers","how to run php in kali linux","how to run php on windows","how to run php program in linux","IBM interview questions and answers","Indecomm Global Services interview questions and answers","Info Edge interview questions and answers","Infogain interview questions and answers","Maintec Technologies Pvt Ltd interview questions and answers","Mphasis interview questions and answers","Net Solutions interview questions and answers","Oracle Corporation interview questions and answers","php 7 command linerun php in terminal macexecute php script from command line linux","php cli","php cli command","php cli example","php cli execute code","php cli install","php cli windows","php cmd","php command","php command line","php command line args","php command line arguments","php command line input","php command line interface","php command line options","php command line script","php command line windows","php command prompt","php console","php console application","php console output","php execute command line","php execute shell script","php linux commandphp.exe location in windows xampp","php terminal","Prokarma Softech Pvt Ltd interview questions and answers","Raqmiyat Information Technologies Pvt Ltd interview questions and answers","run php as a service","run php from command line","run php from command line windows xampp","run php from terminal","Sopra Steria interview questions and answers","Tech Mahindra interview questions and answers","UnitedHealth Group interview questions and answers","ValueLabs interview questions and answers","Virtusa Consulting Services Pvt Ltd interview questions and answers","Wipro interview questions and answers","xtreeme interview questions and answers"],"articleSection":["PHP"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/","name":"How to run PHP in command line ? - PHP Interview Questions - Wikitechy","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-1.png","datePublished":"2021-07-21T13:27:56+00:00","dateModified":"2021-09-08T11:37:23+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"How to run PHP in command line ? - Start a command prompt (Start button > Run > cmd.exe)In the window that appears, type the full path to the PHP executable","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line\/#primaryimage","url":"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-1.png","contentUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/php\/how-to-run-php-in-command-line-1.png"},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757","name":"Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","caption":"Editor"},"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/1147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=1147"}],"version-history":[{"count":3,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/1147\/revisions"}],"predecessor-version":[{"id":3040,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/1147\/revisions\/3040"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=1147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=1147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=1147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}