Why are different results shown?
Smallan
Smallan 2018-11-19 17:53:12
0
4
1276

<?php

//Declare a variable $iphone whose value is a string phone

$iphone = 'Mobile phone';

//unset destroy Remove a variable unset($iphone);

var_dump($iphone);

?>

The result in the web page is displayed as string(6) "mobile phone"

The actual result of the operation is string(4) "mobile phone"

What is the reason for the extra two character length

Smallan
Smallan

reply all(2)
杨云雷

The reason for the encoding format of utf-8 and GBK is 6 for UTF-8 and 4 for GBK

  • reply Thanks
    Smallan author 2018-12-14 16:35:36
藏色散人

What does actual operation mean?

  • reply The environment built by phpstudy, PHP5.4
    Smallan author 2018-12-14 16:36:22
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template