PHPSTORM how to receive / print the result in the IDE's terminal?

Hello, folks! I use PHPSTORM and XAMPP on Mac. Whatever code i put in whatever project and run I receive the following:


/Applications/XAMPP/xamppfiles/bin/php-7.1.1 /Applications/XAMPP /Users/slavchev/Library/Preferences/PhpStorm2018.2/scratches/scratch.php

Process finished with exit code 0 


Or exit code 1, depends of course. If I want to see the result, even "Hello World" I have to click to open the browser and there I can see my code result. Is it possible to see it inside the IDE?

EDIT: new issue. If I use readline() I can't input anything in the IDE and I get error in the terminal.


We need a certain code sample to understand what's going on there. Here's simple code that works:


$abc = 'abc';

$cde = readline();

print $abc . $cde;


@Eugene Morozov

Just in case: try with a scratch file -- that's what OP has. As you know it may behave differently to project files.


P.S. Side note -- why allowing SEO Spam comments?


It's the same for a scratch file:

why allowing SEO Spam comments?

I messed up, the Spam view didn't show me the whole comment so I figured it's legit. Deleted, thank you.


Please sign in to leave a comment.