PHP - ArraysWhich statement about modifying arrays by reference in PHP is true?AAssigning an array element by reference allows changes to affect the original array.BArrays cannot be modified by reference in PHP.CAssigning by reference creates a copy of the array element.DReferences only work with objects, not arrays.Check Answer
Step-by-Step SolutionSolution:Step 1: Understand references in PHP arraysAssigning an element by reference means changes to the reference affect the original array element.Step 2: Evaluate other optionsPHP supports references for arrays; it does not create copies when assigned by reference; references work with arrays and objects.Final Answer:Assigning an array element by reference allows changes to affect the original array. -> Option AQuick Check:References modify original array elements [OK]Quick Trick: References link variables to original data [OK]Common Mistakes:Thinking arrays can't be referencedConfusing reference assignment with copyingBelieving references only apply to objects
Master "Arrays" in PHP9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More PHP Quizzes Arrays - Associative array creation - Quiz 13medium Functions - Type declarations for parameters - Quiz 15hard Loops - Continue statement with levels - Quiz 1easy Loops - While loop execution model - Quiz 5medium Operators - Assignment and compound assignment - Quiz 11easy Output and String Handling - Printf and sprintf formatting - Quiz 4medium Output and String Handling - Echo statement - Quiz 10hard Output and String Handling - Echo statement - Quiz 14medium PHP Basics and Execution Model - First PHP program (Hello World) - Quiz 10hard Variables and Data Types - Integer type and behavior - Quiz 1easy