By using our mini forum, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy

Q: PHPStorm as a console app with php

+1 vote

How to configure PHP Storm to work with inputs - meaning with command line (for example with readline() function), not in browser ( do not need debugging in browser). I need to create console app with php and run php as a script.


asked in PHP category by user golearnweb
edited by user golearnweb

1 Answer

+1 vote
Best answer

Here on the screenshot you can see how to configure PHPStorm to show PHP as a script:

run php as a script with phpstorm

...and this is my program:


echo "Enter your grade:";
$grade = readline();
$oldGrade = 5;
$finalGrade = ($grade + $oldGrade) / 2;

BTW, here you can check how to configure phpstorm to work with Xdebug in a browser.

answered by user ak47seo
selected by user golearnweb