3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'str i ng'; $chars = preg_split('/\s/', $str); var_dump( $chars );
based on JXibB
Output for 5.3.20 - 7.2.0
array(3) { [0]=> string(3) "str" [1]=> string(1) "i" [2]=> string(2) "ng" }