3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array ( 0 => array ( 'name' => 'test', 'address_1' => 'test', 'address_2' => '', 'address_3' => '', 'address_4' => '', 'postcode' => 'test', 'country' => '1', 'tel' => '123566', ), 1 => array ( 'name' => 'test', 'address_1' => 'test', 'address_2' => '', 'address_3' => '', 'address_4' => '', 'postcode' => 'test', 'country' => '1', 'tel' => '123566', ), 2 => array ( 'name' => 'test', 'address_1' => 'test', 'address_2' => '', 'address_3' => '', 'address_4' => '', 'postcode' => 'test', 'country' => '1', 'tel' => '123566', ), 3 => array ( 'name' => 'test', 'address_1' => 'test', 'address_2' => '', 'address_3' => '', 'address_4' => '', 'postcode' => 'test', 'country' => '1', 'tel' => '123566', ), ); // $acount = array_count_values($a); print_r(array_keys($acount)); var_export(array_keys($acount));
based on 1Dg4c
Output for 5.3.0 - 7.2.0
Notice: Undefined variable: acount in /in/jLpjU on line 52 Warning: array_keys() expects parameter 1 to be array, null given in /in/jLpjU on line 52 Notice: Undefined variable: acount in /in/jLpjU on line 54 Warning: array_keys() expects parameter 1 to be array, null given in /in/jLpjU on line 54 NULL
Output for 5.0.4 - 5.2.17
Notice: Undefined variable: acount in /in/jLpjU on line 52 Warning: array_keys(): The first argument should be an array in /in/jLpjU on line 52 Notice: Undefined variable: acount in /in/jLpjU on line 54 Warning: array_keys(): The first argument should be an array in /in/jLpjU on line 54 NULL
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: acount in /in/jLpjU on line 52 Warning: array_keys(): The first argument should be an array in /in/jLpjU on line 52 Notice: Undefined variable: acount in /in/jLpjU on line 54 Warning: array_keys(): The first argument should be an array in /in/jLpjU on line 54 NULL
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: acount in /in/jLpjU on line 52 Warning: array_keys() [http://www.php.net/function.array-keys]: The first argument should be an array in /in/jLpjU on line 52 Notice: Undefined variable: acount in /in/jLpjU on line 54 Warning: array_keys() [http://www.php.net/function.array-keys]: The first argument should be an array in /in/jLpjU on line 54 NULL