<?php $str = ' '; if (preg_match_all('/\s{2,}/u', $str, $matches)) { var_dump($matches);}
Standard input is empty
array(1) { [0]=> array(1) { [0]=> string(4) " " } }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!