<?php
include_once("c_debug_info.php");

class c_page_cab_debug_session extends c_page_cab_debug_info
{
  public $h1='Сессия' ;

  function block_main()
  { $this->page_title() ;
    $this->panel_info() ;
  }


  function panel_info()
  {  $cont=serialize($_SESSION) ;
     ?><strong>Размер серилизованных данных сесиии: </strong><? echo show_size(strlen($cont)).'<br>' ;
     $arr_sizes=[] ; $arr_sizes2=[] ;
     if (_sizeof($_SESSION)) foreach($_SESSION as $title=>$item) $arr_sizes[$title]=strlen(serialize($item)) ;
     arsort($arr_sizes) ;
     if (_sizeof($arr_sizes)) foreach($arr_sizes as $title=>$size)
       { if (is_object($_SESSION[$title])) $type='object' ;
         else if (is_array($_SESSION[$title])) $type='array' ;
         else  $type='var' ;
         $arr_sizes2[$title]=['type'=>$type,'size'=>show_size($size)] ;
       }
     ?><h3>Размеры компонентов сессии</h3><?
     print_2x_arr($arr_sizes2);
      ?><h3>Дамп сессии</h3><?
     damp_array($_SESSION,1,-1);
     ?><h3>Дамп GENERAL</h3><?
     damp_array(GENERAL(),1,-1);

  }

}



?>
