3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = 'email already exists\r\n\r\nsuccess\r\n\r\ncoreg_status:duplicate\r\n\r\nlead_status:success\r\n'; $test = str_replace("\\r\\n", "\\n", $str); $hmm = explode("\\n", $str); var_dump($hmm);
Output for 4.3.0 - 7.1.0
array(8) { [0]=> string(22) "email already exists\r" [1]=> string(2) "\r" [2]=> string(9) "success\r" [3]=> string(2) "\r" [4]=> string(24) "coreg_status:duplicate\r" [5]=> string(2) "\r" [6]=> string(21) "lead_status:success\r" [7]=> string(0) "" }