- var_dump: documentation ( source)
- ini_set: documentation ( source)
- preg_split: documentation ( source)
<?php
// example code
ini_set('pcre.backtrack_limit', 1);
$text = "<p>www.test.com</p>";
$chunks = is_null($text) ? array('') : preg_split('/(<.+?>)/is', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
var_dump($chunks);