Matrix class for PHP with basic operations and algorithms