Boost your PHP skills with these essential true or false questions on PHP basics. Perfect for beginners and interview preparation. Test your knowledge now!.
✅ True – PHP scripts can be embedded within an HTML file, allowing dynamic content to be generated and displayed on web pages.
❌ False – In PHP, variable names are case-sensitive. For example, `$Variable` and `$variable` would be treated as two different variables.
✅ True – The `phpinfo()` function outputs information about PHP's configuration, loaded modules, and environment settings, which is useful for debugging and configuration checks.
❌ False – The `echo` statement in PHP is used to output data to the browser, not to terminate a script. To terminate a script, the `exit()` or `die()` functions are used.
✅ True – PHP scripts must have a `.php` extension in order to be processed by the PHP engine. Files with this extension are interpreted as PHP scripts by the server.
JavaScript can be used both on the client-side and server-side. ✅ True
PHP code is executed by the browser. ❌ False — PHP is executed on the server.
CSS is a server-side scripting language. ❌ False — CSS is a client-side style language.
Server-side scripts cannot access a database. ❌ False — That’s one of their main purposes.
AJAX helps send data to the server without refreshing the page. ✅ True