PHP - Basics and Execution ModelWhich of the following is the correct way to start a PHP script?A<script>echo 'Hello';</script>B<php echo 'Hello'; ?>C<? echo 'Hello'; ?>D<?php echo 'Hello'; ?>Check Answer
Step-by-Step SolutionSolution:Step 1: Recall PHP opening tagsThe standard way to start PHP code is with tags.Step 2: Check each option uses the correct full opening tag. misses the question mark. echo 'Hello'; ?> uses short tags which may not be enabled. is JavaScript, not PHP.Final Answer: -> Option DQuick Check:Standard PHP tag = D [OK]Quick Trick: Use Common Mistakes:Using Relying on short tags which may be disabledConfusing PHP with JavaScript tags
Master "Basics and Execution Model" in PHP9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More PHP Quizzes Arrays - Associative array creation - Quiz 4medium Loops - Continue statement with levels - Quiz 7medium Loops - For loop execution model - Quiz 12easy Output and String Handling - Echo statement - Quiz 3easy PHP Basics and Execution Model - What is PHP - Quiz 13medium PHP Basics and Execution Model - PHP Installation and Setup - Quiz 4medium PHP Basics and Execution Model - What is PHP - Quiz 8hard PHP Request Lifecycle - Script execution and memory reset - Quiz 13medium Type Handling - Gettype and typeof checks - Quiz 3easy Type Handling - Isset, empty, and is_null behavior - Quiz 13medium