fork(6) download
  1. <?php
  2.  
  3. $str = 'oneTwoThreeFour';
  4. preg_match_all('/((?:^|[A-Z])[a-z]+)/',$str,$matches);
  5. var_dump($matches);die;
Success #stdin #stdout 0.02s 24144KB
stdin
Standard input is empty
stdout
array(2) {
  [0]=>
  array(4) {
    [0]=>
    string(3) "one"
    [1]=>
    string(3) "Two"
    [2]=>
    string(5) "Three"
    [3]=>
    string(4) "Four"
  }
  [1]=>
  array(4) {
    [0]=>
    string(3) "one"
    [1]=>
    string(3) "Two"
    [2]=>
    string(5) "Three"
    [3]=>
    string(4) "Four"
  }
}