src/Maths/Algebra/Matrix.php
public function __debug($property = null, $verbose = false)
    {
        $str = '';
        switch ($property) {
            case 'x':
                if ($verbose) {
                    $str .= "current 'x' index is: ";
                }
                $str .= $this->keyX();
                break;
            case 'y':
                if ($verbose) {
                    $str .= "current 'y' index is: ";
                }
                $str .= $this->keyY();
                break;
            case 'xy':
                if ($verbose) {
                    $str .= "current 'xy' index is: ";
                }
                $str .= $this->keyXY();
                break;
            case 'line':
                if ($verbose) {
                    $str .= "current line is: ";
                }
                $str .= $this->currentX();
                break;
            case 'column':
                if ($verbose) {
                    $str .= "current column is: ";
                }
                $str .= $this->currentY();
                break;
            case 'cell':
                if ($verbose) {
                    $str .= "current cell is: ";
                }
                $str .= $this->currentXY();
                break;
            case '_walk_flag':
                if ($verbose) {
                    $str .= "current walking flag is: "
                        .$this->getWalkFlag()
                        .' ('.(($this->getWalkFlag() & self::WALK_X) ? 'X' : (($this->getWalkFlag() & self::WALK_Y) ? 'Y' : 'XY')).')';
                } else {
                    $str .= $this->getWalkFlag();
                }
                break;
            case '_array_flag':
                if ($verbose) {
                    $str .= "current array access flag is: "
                        .$this->getArrayFlag()
                        .' ('.((($this->getArrayFlag() & self::ARRAY_INT) ? 'INT' : 'XY')).')';
                } else {
                    $str .= $this->getArrayFlag();
                }
                break;
            case 'matrix': default:
            if ($verbose) {
                $str .= "matrix of {$this->countX()} lines & {$this->countY()} columns"
                    ." ({$this->countXY()} cells)"
                    .PHP_EOL."walking flag is ".(($this->getWalkFlag() & self::WALK_X) ? 'X' : (($this->getWalkFlag() & self::WALK_Y) ? 'Y' : 'XY'))
                    .PHP_EOL."array access flag is ".(($this->getArrayFlag() & self::ARRAY_INT) ? 'INT' : 'XY')
                    .PHP_EOL."----------------".PHP_EOL;
            }
            foreach ($this->data as $x=>$cell) {
                foreach ($cell as $y=>$val) {
                    $str .= '['.($x+1).self::XY_SEPARATOR.($y+1).']'.$val.' ';
                }
                $str .= PHP_EOL;
            }
            break;
        }
        return $str;
    }
public function __debug($property = null, $verbose = false)
    {
        $str = '';
        switch ($property) {
            case 'x':
                if ($verbose) {
                    $str .= "current 'x' index is: ";
                }
                $str .= $this->keyX();
                break;
            case 'y':
                if ($verbose) {
                    $str .= "current 'y' index is: ";
                }
                $str .= $this->keyY();
                break;
            case 'xy':
                if ($verbose) {
                    $str .= "current 'xy' index is: ";
                }
                $str .= $this->keyXY();
                break;
            case 'line':
                if ($verbose) {
                    $str .= "current line is: ";
                }
                $str .= $this->currentX();
                break;
            case 'column':
                if ($verbose) {
                    $str .= "current column is: ";
                }
                $str .= $this->currentY();
                break;
            case 'cell':
                if ($verbose) {
                    $str .= "current cell is: ";
                }
                $str .= $this->currentXY();
                break;
            case '_walk_flag':
                if ($verbose) {
                    $str .= "current walking flag is: "
                        .$this->getWalkFlag()
                        .' ('.(($this->getWalkFlag() & self::WALK_X) ? 'X' : (($this->getWalkFlag() & self::WALK_Y) ? 'Y' : 'XY')).')';
                } else {
                    $str .= $this->getWalkFlag();
                }
                break;
            case '_array_flag':
                if ($verbose) {
                    $str .= "current array access flag is: "
                        .$this->getArrayFlag()
                        .' ('.((($this->getArrayFlag() & self::ARRAY_INT) ? 'INT' : 'XY')).')';
                } else {
                    $str .= $this->getArrayFlag();
                }
                break;
            case 'matrix': default:
            if ($verbose) {
                $str .= "matrix of {$this->countX()} lines & {$this->countY()} columns"
                    ." ({$this->countXY()} cells)"
                    .PHP_EOL."walking flag is ".(($this->getWalkFlag() & self::WALK_X) ? 'X' : (($this->getWalkFlag() & self::WALK_Y) ? 'Y' : 'XY'))
                    .PHP_EOL."array access flag is ".(($this->getArrayFlag() & self::ARRAY_INT) ? 'INT' : 'XY')
                    .PHP_EOL."----------------".PHP_EOL;
            }
            foreach ($this->data as $x=>$cell) {
                foreach ($cell as $y=>$val) {
                    $str .= '['.($x+1).self::XY_SEPARATOR.($y+1).']'.$val.' ';
                }
                $str .= PHP_EOL;
            }
            break;
        }
        return $str;
    }
Special `__toString()` with infos

@param   string  $property   An object variable to debug: x, y, xy, line, column, cell, flag or matrix (default)
@param   bool    $verbose    Include some info about current matrix
@return  string