コード例 #1
0
 /**
  *    Recursive type test.
  *    @param mixed $first    Test subject.
  *    @param mixed $second   Comparison object.
  *	  @return boolean		 True if same type.
  *    @access private
  *    @static
  */
 function _isIdenticalType($first, $second)
 {
     if (gettype($first) != gettype($second)) {
         return false;
     }
     if (is_object($first) && is_object($second)) {
         if (get_class($first) != get_class($second)) {
             return false;
         }
         return SimpleTestCompatibility::_isArrayOfIdenticalTypes(get_object_vars($first), get_object_vars($second));
     }
     if (is_array($first) && is_array($second)) {
         return SimpleTestCompatibility::_isArrayOfIdenticalTypes($first, $second);
     }
     return true;
 }