What will be the output of the following PHP code?

🎲 Try a Random Question  |  Total Questions in Quiz: 10  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
PHP Programming Basics Practice Test: Basics of Preg in PHP — practice the complete quiz, review flashcards, or try a random question.

The preg_match() function is a built-in function of PHP that performs a regular expression match. This function searches the string for pattern, and returns true if the pattern exists otherwise returns false. Generally, the searching starts from the beginning of $subject string parameter.

Related Test: PHP Programming Basics Practice Test: Strings And Regular Expression in PHP


What will be the output of the following PHP code?<br><?php<br>$line = "You like dogs. I hate dogs. We should marry.";<br>$sen = preg_split('/\./', $line);<br>print_r($sen);<br>?>






ADVERTISEMENT