3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parseMT4Answer($data){ if ($data[0][0] === 'error') { $result['success'] =FALSE; $result['reason'] ='connection error'; return $result; } $result = array(); foreach ($data as $v){ if ($v[0]==='result' && $v[1]==='1') { $result['success'] =TRUE; }else{ if ($v[0]==='reason'){ $result['success']=FALSE; $result['reason']=$v[1]; }else{ $result[$v[0]]=$v[1]; } } } return $result; } $data=array(array("")); $t = parseMT4Answer($data); $t = array(12); echo var_dump(is_null($t['']));
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key 1 in /in/v0W3r on line 18 Warning: Undefined array key "" in /in/v0W3r on line 28 bool(true)

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