🐘 PHP Beginner

What is PHP?

Why Interviewers Ask This

Interviewers use this question to quickly assess whether a candidate has the foundational knowledge required for PHP development. It reveals whether you understand the building blocks that more complex concepts rely on.

Answer

PHP (Hypertext Preprocessor) is a widely-used, open-source, server-side scripting language designed specifically for web development. It was created by Rasmus Lerdorf in 1994. PHP code is executed on the server, and the result is sent to the browser as plain HTML — the client never sees the PHP code. It is embedded directly into HTML using <?php ... ?> tags. PHP can connect to databases, handle forms, create sessions, read and write files, and interact with server-side resources. It powers a huge portion of the web, including WordPress, Wikipedia, and Facebook (which used PHP at its early stages and created Hack as a typed superset).

Pro Tip

Demonstrate both theoretical understanding and practical experience. Say what it is, then give an example of how you actually used it in a PHP codebase.