src/LinearAlgebra/MatrixFactory.php
public static function zero(int $m, int $n): Matrix
    {
        if ($m < 1 || $n < 1) {
            throw new Exception\OutOfBoundsException("m and n must be > 0. m = $m, n = $n");
        }

        $R = [];

        for ($i = 0; $i < $m; $i++) {
            for ($j = 0; $j < $n; $j++) {
                $R[$i][$j] = 0;
            }
        }

        return self::create($R);
    }
public static function zero(int $m, int $n): Matrix
    {
        if ($m < 1 || $n < 1) {
            throw new Exception\OutOfBoundsException("m and n must be > 0. m = $m, n = $n");
        }

        $R = [];

        for ($i = 0; $i < $m; $i++) {
            for ($j = 0; $j < $n; $j++) {
                $R[$i][$j] = 0;
            }
        }

        return self::create($R);
    }
public static function zero ( int $ m , int $ n ) : Matrix { if ( $ m < 1 || $ n < 1 ) { throw new Exception \ OutOfBoundsException ( "m and n must be > 0. m = $m, n = $n" ) ; } $ R = [ ] ; for ( $ i = 0 ; $ i < $ m ; $ i ++ ) { for ( $ j = 0 ; $ j < $ n ; $ j ++ ) { $ R [ $ i ] [ $ j ] = 0 ; } } return self :: create ( $ R ) ; }
Zero matrix - m x n matrix with all elements being zeros

Example:
m = 3; n = 3

[0 0 0]
A = [0 0 0]
[0 0 0]

@param int $m rows
@param int $n columns

@return Matrix

@throws Exception\BadDataException
@throws Exception\IncorrectTypeException
@throws Exception\MathException
@throws Exception\MatrixException
@throws Exception\OutOfBoundsException if m < 1 or n < 1
Zero matrix - m x n matrix with all elements being zeros