3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = array('text' => ''); $errors = array_filter($errors); if (empty($errors)) { echo "\nVazio"; } var_dump($errors); if (empty($values)) { echo "\nVazio"; } else { echo "Not vazio"; }
Output for 5.3.0 - 5.6.26, 7.0.0 - 7.1.0
Notice: Undefined variable: errors in /in/cKQqf on line 4 Warning: array_filter() expects parameter 1 to be array, null given in /in/cKQqf on line 4 VazioNULL Vazio
Output for hhvm-3.10.0 - 3.14.4
Notice: Undefined variable: errors in /in/cKQqf on line 4 Warning: array_filter() expects parameter 1 to be an array or collection in /in/cKQqf on line 4 VazioNULL Vazio
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: errors in /in/cKQqf on line 4 Warning: array_filter(): The first argument should be an array in /in/cKQqf on line 4 VazioNULL Vazio
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: errors in /in/cKQqf on line 4 Warning: array_filter(): The first argument should be an array in /in/cKQqf on line 4 VazioNULL Vazio
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: errors in /in/cKQqf on line 4 Warning: array_filter() [http://www.php.net/function.array-filter]: The first argument should be an array in /in/cKQqf on line 4 VazioNULL Vazio