3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime(); $formatted = ""; $arrFormattedBDays = []; $birthdays = ['18-Jul-46','19-Aug-47','1-Jan-19','31-Dec-18']; foreach ($birthdays as $b){ list($d,$m,$y) = explode("-",$b); $y = '19'.$y; $dt = new DateTime("$d-$m-$y"); $formatted = $dt->format('d/m/Y'); $arrFormattedBDays[] = $formatted; } var_dump($arrFormattedBDays);
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { [0]=> string(10) "18/07/1946" [1]=> string(10) "19/08/1947" [2]=> string(10) "01/01/1919" [3]=> string(10) "31/12/1918" }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
178.39 ms | 405 KiB | 5 Q