PHP script content displayed in browser, but script not executed

The file ‘php_info.php’ has been uploaded to the ‘htdocs’ directory. When I type in the browser the URL ‘http://www.mysubdomain.rf.gd/php_info.php’, only the PHP script is shown (<?php phpinfo(); ?>); however, the script is not executed. Could you please advice what I am missing? Thank you in advance.

You can see your phpinfo in vPanel.
Why doesn’t it execute — I don’t know, and I have not enough information to help you with your problem (links, code screenshot)

I checked your “php script”, and this is what I saw:

I don’t know what language you usually write in, or what software you used to write that file, but it seems like some additional, unknown characters made it’s way into your code. And since those characters are not valid PHP code, it won’t execute.

Dear Admin,
thanks a lot for the hint. I have used Windows Notepad, and I don’t know what has caused the addition of the characters. Nonetheless, I could correct the simple script via cPanel → Online File Manager → Edit. The PHP script is working as expected now. Many thanks for your swift response.