3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $list = [ 'abc', ['oele' => 'boele'], ['boele' => 'oele'], ['oele' => 'boele'], ]; print_r($list); foreach ($list as $item) { var_dump(array_search($item, $list)); } print_r(array_unique($list));
Output for 7.2.0
Array ( [0] => abc [1] => Array ( [oele] => boele ) [2] => Array ( [boele] => oele ) [3] => Array ( [oele] => boele ) ) int(0) int(1) int(2) int(1) Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Array ( [0] => abc [1] => Array ( [oele] => boele ) )
Output for 7.0.0 - 7.1.10
Array ( [0] => abc [1] => Array ( [oele] => boele ) [2] => Array ( [boele] => oele ) [3] => Array ( [oele] => boele ) ) int(0) int(1) int(2) int(1) Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Array ( [0] => abc [1] => Array ( [oele] => boele ) )
Output for 5.4.12 - 5.6.28
Array ( [0] => abc [1] => Array ( [oele] => boele ) [2] => Array ( [boele] => oele ) [3] => Array ( [oele] => boele ) ) int(0) int(1) int(2) int(1) Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Notice: Array to string conversion in /in/kBKL8 on line 16 Array ( [0] => abc [1] => Array ( [oele] => boele ) )
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/kBKL8 on line 3
Process exited with code 255.