3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $s = '123_abc____def'; var_dump( preg_replace( '/\_+[a-zA-Z]{1}/e', '_' . strtoupper('\\1'), $s) );
based on 3iUIQ
Output for 7.0.20, 7.1.5 - 7.2.0
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/rdcOB on line 9 NULL
Output for 7.0.0 - 7.0.6, 7.1.0
Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in /in/rdcOB on line 8 NULL
Output for 5.5.24 - 5.6.28
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /in/rdcOB on line 9 Notice: Use of undefined constant _ - assumed '_' in /in/rdcOB(9) : regexp code on line 1 Notice: Use of undefined constant _ - assumed '_' in /in/rdcOB(9) : regexp code on line 1 string(9) "123_bc_ef"
Output for 5.3.21 - 5.4.45
Notice: Use of undefined constant _ - assumed '_' in /in/rdcOB(9) : regexp code on line 1 Notice: Use of undefined constant _ - assumed '_' in /in/rdcOB(9) : regexp code on line 1 string(9) "123_bc_ef"