3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $result = preg_replace('/(?<=[a-zA-Z])([A-Z])(?=[a-zA-Z])/', "_$1", 'spbAddress12'); print preg_replace('/([a-zA-Z][0-9])/', "_$1", $result);
based on CmFXP
Output for 4.3.0 - 7.1.0
spb_Addres_s12