Explanation: static keyword enables late static binding.
Dear candidates you will find MCQ questions of PHP here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
Explanation: static keyword enables late static binding.
class A { public static function test() { echo 'A'; } }
class B extends A { public static function test() { parent::test(); echo 'B'; } }
B::test();
Explanation: parent::test() prints A, then B.
Explanation: $_SESSION holds session variables.
echo is_numeric('123abc') ? 'Yes' : 'No';
Explanation: '123abc' is not purely numeric.
$a = [1,2,3]; echo array_push($a, 4);
Explanation: array_push returns new array length.
Explanation: Composer manages PHP dependencies.
echo count(null);
Explanation: count(null) returns 0.
Explanation: password_hash is recommended for secure hashing.
Explanation: Traits allow horizontal code reuse.
Explanation: Opcode caching (like OPcache) significantly improves performance.