3v4l.org

run code in 300+ PHP versions simultaneously
<?php function format_date($d) { $m = array(); preg_match('/(\d{4})[\.-\/](\d{2})[\.-\/](\d{2})/', $d, $m); if (count($m) == 4) { $d = "$m[2]/$m[3]/$m[1]"; } return $d; } print_r(format_date('2015-01-01')).PHP_EOL; print_r(format_date('2015/01/02')).PHP_EOL; print_r(format_date('2015.01-03')).PHP_EOL;
Output for git.master, git.master_jit, rfc.property-hooks
2015-01-0101/02/20152015.01-03

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:
30.17 ms | 401 KiB | 8 Q