3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tel_code = 44; $nos[] = '07905881965'; $nos[] = '+07905881965'; $nos[] = '7905881965'; foreach($nos as $no) { $composite = preg_replace('/^0?/', $tel_code, $no); var_dump($composite); }
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
string(12) "447905881965" string(14) "44+07905881965" string(12) "447905881965"
Output for hhvm-3.10.0

Process exited with code 153.