<?php $string = "facebookPageUrl"; preg_match_all('((?:^|[A-Z])[^A-Z]*)', $string, $matches);var_dump($matches);
Standard input is empty
array(1) { [0]=> array(3) { [0]=> string(8) "facebook" [1]=> string(4) "Page" [2]=> string(3) "Url" } }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!