3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr=[ ["2015年5月", "---", "---"], ["2015年12月", "(2016年1月20日)", "---"], ["2016年6月", "(2016年7月16日)", "---"] ]; // Aパターン $arr2=[]; foreach ($arr as $key => $value) { $arr2[]=preg_replace("/---/","000", $value); print_r($arr2); } // Bパターン $arr2=[]; foreach ($arr as $key => $value) { $arr2[]=preg_replace("/---/","000", $value); } print_r($arr2);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => 2015年5月 [1] => 000 [2] => 000 ) ) Array ( [0] => Array ( [0] => 2015年5月 [1] => 000 [2] => 000 ) [1] => Array ( [0] => 2015年12月 [1] => (2016年1月20日) [2] => 000 ) ) Array ( [0] => Array ( [0] => 2015年5月 [1] => 000 [2] => 000 ) [1] => Array ( [0] => 2015年12月 [1] => (2016年1月20日) [2] => 000 ) [2] => Array ( [0] => 2016年6月 [1] => (2016年7月16日) [2] => 000 ) ) Array ( [0] => Array ( [0] => 2015年5月 [1] => 000 [2] => 000 ) [1] => Array ( [0] => 2015年12月 [1] => (2016年1月20日) [2] => 000 ) [2] => Array ( [0] => 2016年6月 [1] => (2016年7月16日) [2] => 000 ) )

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:
64.74 ms | 403 KiB | 8 Q