3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = 'Happy^ hour^ / is fun //'; function filenameEncode($possible_filename){ $fngood = str_replace(array('^',';','/',':'), array('^^',';;','^',';'), $possible_filename); return $fngood; } echo $s."\n"; echo filenameEncode($s);
Output for 4.3.0 - 7.1.0
Happy^ hour^ / is fun // Happy^^ hour^^ ^ is fun ^^