3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = '\n123133\n\n54444\n435345345\n43534535'; preg_replace('/[\D](\\n)/g', '', $string); echo $string;
Output for 4.3.11 - 7.2.0
Warning: preg_replace(): Unknown modifier 'g' in /in/H5KF0 on line 5 \n123133\n\n54444\n435345345\n43534535
Output for 4.3.0 - 4.3.10
Warning: Unknown modifier 'g' in /in/H5KF0 on line 5 \n123133\n\n54444\n435345345\n43534535