3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array ( [0] => array ( ['id'] => 11, ['parametername'] => '参数名称11' ) ); $b = array ( [0] => array ( ['id'] => 6, ['parametername'] => '参数名称6' ), [1] => array ( ['id'] => 10, ['parametername'] => '参数名称10' ), [2] => array ( ['id'] => 11, ['parametername'] => '参数名称11' ), [3] => array ( ['id'] => 15, ['parametername'] => '参数编辑' ), [4] => array ( ['id'] => 16, ['parametername'] => '参数20' ) ); var_dump( array_diff($a, $b) );
based on Sic0l
Output for 5.4.0 - 5.6.28
Warning: Illegal offset type in /in/S48EG on line 2 Warning: Illegal offset type in /in/S48EG on line 2 Warning: Illegal offset type in /in/S48EG on line 2 Warning: Illegal offset type in /in/S48EG on line 4 Warning: Illegal offset type in /in/S48EG on line 4 Warning: Illegal offset type in /in/S48EG on line 4 Warning: Illegal offset type in /in/S48EG on line 5 Warning: Illegal offset type in /in/S48EG on line 5 Warning: Illegal offset type in /in/S48EG on line 5 Warning: Illegal offset type in /in/S48EG on line 6 Warning: Illegal offset type in /in/S48EG on line 6 Warning: Illegal offset type in /in/S48EG on line 6 Warning: Illegal offset type in /in/S48EG on line 7 Warning: Illegal offset type in /in/S48EG on line 7 Warning: Illegal offset type in /in/S48EG on line 7 Warning: Illegal offset type in /in/S48EG on line 8 Warning: Illegal offset type in /in/S48EG on line 8 Warning: Illegal offset type in /in/S48EG on line 9 array(0) { }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.28
Parse error: syntax error, unexpected '[', expecting ')' in /in/S48EG on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[', expecting ')' in /in/S48EG on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/S48EG on line 2
Process exited with code 255.