3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $datetime = '2014-11-10-16.14.18'; $datetime = preg_replace('#(\d+)-(\d+)-(\d+)-(\d+)\.(\d+)\.(\d+)#', '\1-\2-\3 \4:\5:\6 ', $datetime); var_dump($datetime);
based on kV5T5
Output for 4.3.0 - 7.3.0
string(20) "2014-11-10 16:14:18 "