3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(PREG_SPLIT_NO_EMPTY); var_dump( preg_split( '/[^a-z]+/i', 'Class::function', PREG_SPLIT_NO_EMPTY)); var_dump( preg_replace( '/[^a-z]+/i', '_', 'Class::function')); var_dump( explode('::','Class::function'));
based on qFTJj
Output for 5.3.18 - 7.2.0
int(1) array(1) { [0]=> string(15) "Class::function" } string(14) "Class_function" array(2) { [0]=> string(5) "Class" [1]=> string(8) "function" }