<?php$subject = '[[delay-4]]Welcome! [[delay-2]]Do you have some questions for us?[[delay-1]] Please fill input field!';$result = preg_replace('/\s*(\[\[delay-\d+]])/i', "\n$1", $subject);$result = preg_split('/\n/i', $result, -1, PREG_SPLIT_NO_EMPTY);var_dump($result);
Standard input is empty
array(3) { [0]=> string(19) "[[delay-4]]Welcome!" [1]=> string(45) "[[delay-2]]Do you have some questions for us?" [2]=> string(36) "[[delay-1]] Please fill input field!" }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!