3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $items = array(array(1,1),array(2,2),array(3,3),array(4,4),array(5,5)); print_r($items[array_rand($items, 3)]);
based on Cd3Fg
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: Illegal offset type in /in/WTgKR on line 5
Output for hhvm-3.12.0
Warning: Invalid operand type was used: Invalid type used as key in /in/WTgKR on line 5 Notice: Array to string conversion in /in/WTgKR on line 5 Notice: Undefined index: Array in /in/WTgKR on line 5
Output for hhvm-3.10.0
Warning: Invalid operand type was used: Invalid type used as key in /in/WTgKR on line 23 Notice: Array to string conversion in /in/WTgKR on line 23 Notice: Undefined index: Array in /in/WTgKR on line 23