3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo preg_replace('/(\w+?)(__)(\w+?)/i', '.', 'aluno_pobre__casado__novata').PHP_EOL; $patterns = array ('/(19|20)(\d{2})-(\d{1,2})-(\d{1,2})/', '/^\s*{(\w+)}\s*=/'); $replace = array ('\3/\4/\1\2', '$\1 ='); echo preg_replace($patterns, $replace, '{startDate} = 1999-5-27'); ?>
based on h94rt
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.2.0
..ovata $startDate = 5/27/1999
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/vFmj7 on line 2 ..ovataPHP_EOL$startDate = 5/27/1999