var_dump — 打印变量的相关信息

<?php
$a  = array( 1 ,  2 , array( "a" ,  "b" ,  "c" ));
 var_dump ( $a );
 ?> 

  输出:

array(3) {
  [0]=>
  int(1)
  [1]=>
  int(2)
  [2]=>
  array(3) {
    [0]=>
    string(1) "a"
    [1]=>
    string(1) "b"
    [2]=>
    string(1) "c"
  }
}

  

<?php

$b  =  3.1 ;
 $c  =  true ;
 var_dump ( $b ,  $c );

 ?> 

  输出:

float(3.1)
bool(true)

 说明:

void  var_dump  ( mixed  $expression  [, mixed  $...  ] )

  

 

posted @ 2015-04-27 20:08  todaytoday  阅读(491)  评论(0编辑  收藏  举报