MCQs > IT & Programming > Regular Expressions With PHP Test > Analyze the following code snippet that uses the preg_split() PHP Regular Expression method: < ?php $str = 'string'; $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); print_r($chars); ?> What will be the output of the above code?

Regular Expressions With PHP Test MCQs

Analyze the following code snippet that uses the preg_split() PHP Regular Expression method:

<?php
$str = 'string';
$chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);
print_r($chars);
?>

What will be the output of the above code?


Answer

Correct Answer:

Array ( [0] => s [1] => t [2] => r [3] => i [4] => n [5] => g )

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Regular Expressions With PHP Test Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More Regular Expressions With PHP Test MCQ Questions

search

Regular Expressions With PHP Test Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it