3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array1 = array( 'A' => 10, 'B' => 20, 'C' => 30, 'D' => 40 ); $array2 = array( '0' => A, '1' => B, ); print_r(array_diff($array2, array_flip($array1)));
Output for 7.2.0
Warning: Use of undefined constant A - assumed 'A' (this will throw an Error in a future version of PHP) in /in/mmH7L on line 10 Warning: Use of undefined constant B - assumed 'B' (this will throw an Error in a future version of PHP) in /in/mmH7L on line 11 Array ( )
Output for 5.3.18 - 7.1.10
Notice: Use of undefined constant A - assumed 'A' in /in/mmH7L on line 10 Notice: Use of undefined constant B - assumed 'B' in /in/mmH7L on line 11 Array ( )