3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array1 = array('field1' => 'toast', 'field2' => 'butter'); $array2 = array('field1' => 'toast', 'field2' => 'margerine', 'field3' => 'tea'); $keys = array(); print_r(array_diff_key($array1, $array2)); foreach($array2 as $key=>$value) { $t = 0; foreach($array1 as $key2=>$value2) { if($value == $value2) { $t++; } } if($t==0) array_push($keys, $key) } print_r($keys);
Output for 5.3.0 - 5.4.25
Parse error: syntax error, unexpected '}' in /in/8lG3v on line 26
Process exited with code 255.