There is no difference except that the closing delimiter cannot appear without escaping.
This is useful when the standard delimiter is used a lot, for example. instead
preg_match("/^http:\\/\\/.+/", $str);
You can write
preg_match("[^http://.+]", $str);
to avoid the need to avoid /.
source
share