fork(2) download
  1. <?php
  2.  
  3. $re = '/\s+(?=\+?\d+$)/';
  4. $strs = ['Johny +6013699900','2. Rahul Khan 0146067705','Johny +6013699900','Henry 01363456900'];
  5. foreach ($strs as $s) {
  6. print_r(preg_split($re, $s));
  7. }
Success #stdin #stdout 0.02s 23596KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Johny
    [1] => +6013699900
)
Array
(
    [0] => 2. Rahul Khan
    [1] => 0146067705
)
Array
(
    [0] => Johny
    [1] => +6013699900
)
Array
(
    [0] => Henry
    [1] => 01363456900
)