fork(5) download
  1. <?php
  2.  
  3. $string = "facebookPageUrl";
  4.  
  5. preg_match_all('((?:^|[A-Z])[^A-Z]*)', $string, $matches);
  6. var_dump($matches);
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
array(1) {
  [0]=>
  array(3) {
    [0]=>
    string(8) "facebook"
    [1]=>
    string(4) "Page"
    [2]=>
    string(3) "Url"
  }
}