3v4l.org

run code in 300+ PHP versions simultaneously
<?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);
Output for 7.3.33, 8.1.0 - 8.1.29, 8.2.10 - 8.2.20, 8.3.0 - 8.3.8
bool(false)
Output for 7.0.33, 7.1.33, 7.2.34
array(3) { [0]=> string(0) "" [1]=> string(3) "<p>" [2]=> string(16) "www.test.com</p>" }
Output for 5.3.29, 5.6.40
array(1) { [0]=> string(19) "<p>www.test.com</p>" }

preferences:
72.6 ms | 401 KiB | 39 Q