3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo preg_replace('/([^_]\w)(__)([^_]\w)/i', '$1.$3', '___aluno_pobre__casado__novata___caramba'); ?>
based on PFSCC
Output for 4.3.0 - 7.2.0
___aluno_pobre.casado.novata_.caramba