3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $number = '+421917982116'; $haveNumberPlus = strpos($number, '+'); var_dump($haveNumberPlus); if (!$haveNumberPlus) { echo number_format((int)$number, 0, ' ', ' '); } echo '+' . number_format((int)$number, 0, ' ', ' ');
Output for 7.1.4
int(0) 421 917 982 116+421 917 982 116