Driver code
$ mat = array ( array ( 0 , 1 , 1 , 1 ) , array ( 1 , 0 , 0 , 0 ) , array ( 1 , 0 , 0 , 0 ) , array ( 1 , 0 , 0 , 0 ) ) ; if ( checkStar ( $ mat ) ) echo ( " Star ▁ Graph " ) ; else echo ( " Not ▁ a ▁ Star ▁ Graph " ) ; ? >