Classes for matrix operations in PHP