如何在php中调试我的类

MyDocumentRoot/MyClasses/LoginStatus.php is as follows

<?php
    Class Hos_LoginStatus
    {
        protected $_signedInUser;
        public function setUserSignedIn()
        {
            session_start();
            if (isset($_SESSION['userSignedIn']))
                $this->_signedInUser = $_SESSION['userSignedIn'];
            elseif (isset($_SESSION['emailSigedIn']))
                $this->_signedInUser = $_SESSION['emailSignedIn'];
            else
                $this->_signedInUser = "";
        }
        public function getUserSignedIn()
        {
            return $this->_signedInUser;
        }
    }

The relevant part of MyDocumentRoot/index.php is as follows

<?php
   require_once 'MyClasses/LoginStatus.php';
   $myLogIn = new Hos_LoginStatus();
   $signedInName->getUserSignedIn();
   echo $signedInName;
?>

Please debug the above; I am new in using classes.

the only problem I see is the way youre accessing your method:

$myLogIn = new Hos_LoginStatus();
$signedInName->getUserSignedIn();

$signedInName is not defined anywhere, it should be:

$myLogIn = new Hos_LoginStatus();
$signedInName = $myLogIn->getUserSignedIn();

You should probably turn error_reporting on in order to see encountered errors.