3v4l.org

run code in 200+ 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_$2", $result);
based on 00DIW
Output for 4.3.0 - 7.2.0
spb_Address_12