3v4l.org

run code in 150+ 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 7dMAP
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( ,, '_'), '/, '_'), '(, '_'), '), '_'), ' , '_'), '-, '_'), ':, '_'), '__