Q26
What will be the output of the following PHP code?
A.
Hello! My name was Cameron Fox. tea?
B.
Hello! My name is Cameron Fox. tea?
C.
Hello! My name is Cameron Fox. Coffee?
D.
Hello! My name was Cameron Fox. Coffee?
AnswerAnswer: Option D
Solution
Answer: Option D
Solution:
Coffee was not replaced because the preg_replace function is case sensitive. Therefore it treats coffee and Coffee differently.