Driver Code
$ mat = array ( array ( 4 , 0 , 0 , 0 ) , array ( 0 , 7 , 0 , 0 ) , array ( 0 , 0 , 5 , 0 ) , array ( 0 , 0 , 0 , 1 ) ) ; if ( isDiagonalMatrix ( $ mat ) ) echo " Yes " , " STRNEWLINE " ; else echo " No " , " STRNEWLINE " ; ? >