3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $start = 6; $list = [ '1楼', '2楼', '3楼', '4楼', '5楼', ]; $list = array_flip( array_map( array_flip($list), function($key){ return $start+(int)$key; } ) );
Output for 7.0.0 - 7.2.0
Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in /in/gmOqO on line 10 Warning: array_flip() expects parameter 1 to be array, null given in /in/gmOqO on line 10
Output for 5.4.11 - 5.6.28
Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in /in/gmOqO on line 11 Warning: array_flip() expects parameter 1 to be array, null given in /in/gmOqO on line 12
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/gmOqO on line 4
Process exited with code 255.