Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
];
var_export(array_map(fn() => array_reverse(func_get_args()), ...$matrix));
echo "\n---\n";
var_export(array_map(fn(...$col) => array_reverse($col), ...$matrix));