3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_set_arr( $hold=null, $use=null, $action_name=null, $action_update=null ){ $set_arr = [ [ 'key'=>'a', 'hold'=>['cat'], 'use'=>['mew'], 'action_name'=>'honk', 'action_update'=>['animal','cute'] ], [ 'key'=>'b', 'hold'=>['dog'], 'use'=>['bow'], 'action_name'=>'bark', 'action_update'=>['animal','cool'] ], [ 'key'=>'c', 'hold'=>['cow'], 'use'=>['moo'] ], ]; // 引数をもとに一致する行の配列を返す $result = []; foreach( $set_arr as $set ){ if( $hold==null ? false : $hold['hold']==$set['hold'] || $use==null ? false : $use['use']==$set['use'] || $action_name==null ? false : $action_name['action_name']==$set['action_name'] || $action_update==null ? false : $action_update['action_update']==$set['action_update'] ){ $result[] = $set; } } return $result; } $args = ['hold'=>['cat']]; $result = get_set_arr( $args ); var_dump( $result );
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /in/WfVEu on line 13
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:
18.66 ms | 401 KiB | 8 Q