3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $cell_content = '10-02-2014'; $cell_content = implode('-', array_reverse(explode('-', $cell_content))); $c2 = preg_replace('/(\d{2})-(\d{2})-(\d{4})/', "\3-\2-\1", $cell_content); echo $cell_content; echo $c2;
based on 0B4jW
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2014-02-102014-02-10