Q. What will the following code output?
<?php
echo strpos('hello world', 'world');
?>

Code:
echo strpos('hello world', 'world');
  • (A) 6
  • (B) 0
  • (C) Error
  • (D) false
πŸ’¬ Discuss
βœ… Correct Answer: (A) 6
Explanation: strpos() returns the position of the first occurrence; 'world' starts at position 6.
Explanation by: Rati Dubey
strpos() returns the position of the first occurrence; 'world' starts at position 6.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
113
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
86%
Success Rate