Make var_dump look pretty

后端 未结 14 2469
忘掉有多难
忘掉有多难 2020-12-02 04:23

I have a simple $_GET[] query var set for showing testing data when pulling down queries from the DB.


  <         


        
14条回答
  •  -上瘾入骨i
    2020-12-02 04:42

    I have make an addition to @AbraCadaver answers. I have included a javascript script which will delete php starting and closing tag. We will have clean more pretty dump.

    May be somebody like this too.

    function dd($data){
      highlight_string("");
      echo '';
      die();
    }
    

    Result before:

    Result After:

    Now we don't have php starting and closing tag

提交回复
热议问题