3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "20142311.235504"; $match = array_combine(['year', 'month', 'day', 'hour', 'minute', 'second'], explode('-', (date_create_from_format("Ydm.His", $str))->format('Y-m-d-H-i-s'))); echo '<pre>', print_r($match);
Output for 7.1.25 - 7.1.30, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
<pre>Array ( [year] => 2014 [month] => 11 [day] => 23 [hour] => 23 [minute] => 55 [second] => 04 ) 1

preferences:
219.75 ms | 403 KiB | 172 Q