3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function grammahBendah($str='', $gender=''){ if ($gender == 'female'){ $str = str_replace(" him"," her", $str); //also handles 'herself' $str = str_replace(" he"," she", $str); $str = str_replace(" his"," her", $str); $nPower00 = $str; return $nPower00; } } var_dump(grammahBendah('themselves', 'female'));
Output for 4.3.0 - 7.2.0
string(10) "themselves"