3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match_all('/^([a-z]{0,3})(\d{3})[-\s]?(\d{2})[-\s]?(\d{4})([0-9a-z]{0,3})$/i', 'ABC123121234ABC', $number); var_dump(vsprintf('%s%s-%s-%s%s', $number));
based on h3XA1
Output for 4.3.0 - 4.4.9, 5.4.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Notice: Array to string conversion in /in/oW7Xj on line 4 Notice: Array to string conversion in /in/oW7Xj on line 4 Notice: Array to string conversion in /in/oW7Xj on line 4 Notice: Array to string conversion in /in/oW7Xj on line 4 Notice: Array to string conversion in /in/oW7Xj on line 4 string(27) "ArrayArray-Array-ArrayArray"
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.0.0 - 5.3.29
string(27) "ArrayArray-Array-ArrayArray"