3v4l.org

run code in 300+ PHP versions simultaneously
<?php $trigger_data = "all:ticket_location:is:5|||all:ticket_sub_location:is:1|||any:ticket_is:created:NULL|||any:ticket_is:updated:NULL|||action:assigned_agent_uid:admin"; $final = array(); foreach(explode('|||', $trigger_data) as $e) { $e = explode(':', $e); $result = &$final; $value = end($e); foreach($e as $parts) { if($value === $parts) { $result = $value; } else { $result = &$result[$parts]; } } } print_r($final);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [all] => Array ( [ticket_location] => Array ( [is] => 5 ) [ticket_sub_location] => Array ( [is] => 1 ) ) [any] => Array ( [ticket_is] => Array ( [created] => NULL [updated] => NULL ) ) [action] => Array ( [assigned_agent_uid] => admin ) )

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:
63.22 ms | 402 KiB | 8 Q