3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "Dec 23 21:37:56 hello", "Jan 12 02:07:23 hello", "Jun 3 23:34:34 hello", "Dec 25 12:47:51 hello" ]; var_export( preg_replace_callback( '/^([a-z]{3}) +\d+/i', function($m) { static $encounteredJan = false; $encounteredJan = $encounteredJan || $m[1] === 'Jan'; return date('Y m d', strtotime($m[0] . ($encounteredJan ? '' : ' -1 year'))); }, $arr ) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => '2022 12 23 21:37:56 hello', 1 => '2023 01 12 02:07:23 hello', 2 => '2023 06 03 23:34:34 hello', 3 => '2023 12 25 12:47:51 hello', )

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:
73.22 ms | 405 KiB | 5 Q