search

Home  >  Q&A  >  body text

Questions about gettype and var_dump?

<?php

$str = 'Do you like Zun Shang or Sha Qian Mo? ';

$boy=var_dump($str);

echo $boy;

?>

This code The output is string(39). Do you like Zun Shang or Sha Qian Mo?

<?php

$str = 'Do you like Zun Shang or Sha Qian Mo? ';

$boy=gettype($str);

echo $boy;

?>

This code The output is string

. They are all strings. What does var_dump output more than one (39) mean?


妞,给爷笑一个妞,给爷笑一个2440 days ago1561

reply all(1)I'll reply

  • sky

    sky2018-03-11 17:30:16

    var_dump’s 39 means its number of bytes

    reply
    0
  • 妞,给爷笑一个

    Thanks for clarifying!

    妞,给爷笑一个 · 2018-03-11 18:02:30
  • Cancelreply