3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = [1, 2, 3]; $b = [3, 4, 5]; $result = [1, 3]; var_export( $result[0] !== $result[1] && ( (in_array($result[0], $a) && in_array($result[1], $b)) || (in_array($result[0], $b) && in_array($result[1], $a)) ) );

preferences:
90.28 ms | 1246 KiB | 5 Q