3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mergeInfos = array( 2=>3 , 4=>3 ,3=>7 ,7=>7); $smallMergeInfos = array(3=>7); foreach ($mergeInfos as $key => $value) { if (array_key_exists($value , $smallMergeInfos)) { $mergeInfos[$key] = $smallMergeInfos[$value]; echo "$key" . "==>>" . "$smallMergeInfos[$value]" . "\n"; } } $campusIds = implode(',' , array_unique(array_values($mergeInfos))); $campus_address_ids = array(1,2,3,4,5,6,7); $campus_address_ids = str_replace(array_keys($mergeInfos) , array_values($mergeInfos) , $campus_address_ids); $campus_address_ids = implode(',' , array_unique($campus_address_ids)); echo $campus_address_ids; echo 'm'-'a';
Output for git.master, git.master_jit, rfc.property-hooks
2==>>7 4==>>7 1,7,5,6 Fatal error: Uncaught TypeError: Unsupported operand types: string - string in /in/5jaff:15 Stack trace: #0 {main} thrown in /in/5jaff on line 15
Process exited with code 255.

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