Zend
200-530 · Question #3750
200-530 Question #3750: Real Exam Question with Answer & Explanation
The correct answer is B. str_replace('a pain', 'cool', 'PHP is a pain.');. Explanation/Reference:
Question
The following code piece should print "PHP is cool", but unexpectedly, it just prints "cool". How would you correct it? echo str_replace('PHP is a pain.', 'a pain', 'cool');
Options
- Astr_replace('PHP is a pain.', 'cool', 'a pain');
- Bstr_replace('a pain', 'cool', 'PHP is a pain.');
- Cstr_replace('cool', 'a pain', 'PHP is a pain.');
Explanation
Explanation/Reference:
Community Discussion
No community discussion yet for this question.