3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pageids = [ ['id' => 1, 'linklabel' => 'Home', 'url' => 'home'], ['id' => 2, 'linklabel' => 'Graphic Design', 'url' => 'graphicdesign'], ['id' => 3, 'linklabel' => 'Other Design', 'url' => 'otherdesign'], ['id' => 6, 'linklabel' => 'Logo Design', 'url' => 'logodesign'], ['id' => 15, 'linklabel' => 'Content Writing', 'url' => 'contentwriting'], ]; $parentpage = [ ['id' => 2, 'linklabel' => 'Graphic Design', 'url' => 'graphicdesign'], ['url' => 'otherdesign', 'id' => 3, 'linklabel' => 'Other Design'], ]; var_export( array_udiff($pageids, $parentpage, fn($a, $b) => $a <=> $b) );
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
array ( 0 => array ( 'id' => 1, 'linklabel' => 'Home', 'url' => 'home', ), 3 => array ( 'id' => 6, 'linklabel' => 'Logo Design', 'url' => 'logodesign', ), 4 => array ( 'id' => 15, 'linklabel' => 'Content Writing', 'url' => 'contentwriting', ), )
Output for 7.1.33, 7.2.34
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ',' or ')' in /in/U9bcn on line 17
Process exited with code 255.

preferences:
93.24 ms | 401 KiB | 125 Q