Not able to interact with php file in xampp

I downloaded xampp and am running a PHP file in my localhost, however, I cannot receive user input from the program, any idea what I am doing wrong? I used both fscanf and readline, but both just stop the program from running.