3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $attributes = [ 'pinned' => $pinned, 'fullTextEnabled' => $fullTextEnabled, 'updateMode' => $updateMode ]; $diff = array_filter($attributes, function ($value) { return $value !== null; }); var_dump($diff);
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: pinned in /in/X0mOc on line 4 Notice: Undefined variable: fullTextEnabled in /in/X0mOc on line 5 Notice: Undefined variable: updateMode in /in/X0mOc on line 6 array(0) { }
Output for 5.4.0 - 5.6.28
Notice: Undefined variable: pinned in /in/X0mOc on line 4 Notice: Undefined variable: fullTextEnabled in /in/X0mOc on line 5 Notice: Undefined variable: updateMode in /in/X0mOc on line 7 array(0) { }
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/X0mOc on line 3
Process exited with code 255.