3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = " sdfsdfsdfsdfsds sdf sdf sdf sdf sdfsdf sdf s sdfsdfsdfsdf sdfsd fsds dffsdf sdfsdfdf "; var_dump($text); $text = mb_split('\r?\n?', $text); var_dump($text);
based on H9MrN
Output for 5.4.13 - 5.6.28, 7.0.0 - 7.1.0
string(100) " sdfsdfsdfsdfsds sdf sdf sdf sdf sdfsdf sdf s sdfsdfsdfsdf sdfsd fsds dffsdf sdfsdfdf " array(7) { [0]=> string(0) "" [1]=> string(46) " sdfsdfsdfsdfsds sdf sdf sdf sdf sdfsdf sdf s" [2]=> string(2) " " [3]=> string(32) " sdfsdfsdfsdf sdfsd fsds dffsdf" [4]=> string(2) " " [5]=> string(10) " sdfsdfdf" [6]=> string(2) " " }
Output for hhvm-3.10.0 - 3.12.0
string(100) " sdfsdfsdfsdfsds sdf sdf sdf sdf sdfsdf sdf s sdfsdfsdfsdf sdfsd fsds dffsdf sdfsdfdf " Warning: Empty regular expression in /in/52ZWJ on line 12 array(2) { [0]=> string(0) "" [1]=> string(99) " sdfsdfsdfsdfsds sdf sdf sdf sdf sdfsdf sdf s sdfsdfsdfsdf sdfsd fsds dffsdf sdfsdfdf " }
Output for 4.3.4 - 5.4.12
string(100) " sdfsdfsdfsdfsds sdf sdf sdf sdf sdfsdf sdf s sdfsdfsdfsdf sdfsd fsds dffsdf sdfsdfdf " Warning: mb_split(): Empty regular expression in /in/52ZWJ on line 12 array(2) { [0]=> string(0) "" [1]=> string(99) " sdfsdfsdfsdfsds sdf sdf sdf sdf sdfsdf sdf s sdfsdfsdfsdf sdfsd fsds dffsdf sdfsdfdf " }
Output for 4.3.2 - 4.3.3
string(100) " sdfsdfsdfsdfsds sdf sdf sdf sdf sdfsdf sdf s sdfsdfsdfsdf sdfsd fsds dffsdf sdfsdfdf " Fatal error: Call to undefined function: mb_split() in /in/52ZWJ on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
string(100) " sdfsdfsdfsdfsds sdf sdf sdf sdf sdfsdf sdf s sdfsdfsdfsdf sdfsd fsds dffsdf sdfsdfdf " Fatal error: Call to undefined function: mb_split() in /in/52ZWJ on line 12