3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $character_map = array(',', '/', '(', ')', ' ', '-', ':', '__'); $replace_values = str_repeat('REPLACE(', count($character_map)); $replace_parts = "), '" . join("', '_'), '", $character_map) . "')"; print $replace_values . "\n\n"; print $replace_parts . "\n";
based on 81GDc
Output for 4.3.0 - 7.2.0
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( ), ',', '_'), '/', '_'), '(', '_'), ')', '_'), ' ', '_'), '-', '_'), ':', '_'), '__')