3v4l.org

run code in 200+ PHP versions simultaneously
<?php $relate_to = array(11,22); $before = null; $relate_to_before = explode(',', $before); sort($relate_to_before); $relate_to_new = array_diff($relate_to, $relate_to_before); var_dump($relate_to_new);
based on FDYr6
Output for 4.3.0 - 7.4.0rc2
array(2) { [0]=> int(11) [1]=> int(22) }