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');
str_replace('PHP is a pain.', 'cool', 'a pain');
str_replace('a pain', 'cool', 'PHP is a pain.');
str_replace('cool', 'a pain', 'PHP is a pain.');
Submit