No, you can't, but you are missing some basic coding and languages fundamentals, like the difference between compiled codes and scripting codes.
In PHP you cannot debug the code in real time like in compiled codes, except if you configure your IDE (like PHPStorm) to make some real time debugging, but that is an advanced task.
Supposing that you are coding on a localhost, what you can do is printing your variable with codes like:
and your values will be printed out, but you need to reload the page.
If you are on a good mood, i recommend you take a look on this XDebug and PHPStorm Real time debugging article! .