Home  >  Article  >  Backend Development  >  Summary of php output string method

Summary of php output string method

WBOY
WBOYOriginal
2016-07-25 08:54:021251browse
  1. $v = new test();
  2. print_r($v);
  3. var_dump($v);
  4. class test {
  5. public $num = 1;
  6. public $str = "222 ";
  7. public $bln = true;
  8. function test() {
  9. global $num;
  10. }
  11. }
Copy the code

The result is: test object ( [num] => 1 [str] => 222 [bool] => 1 ) object(test)#1 (3) { ["num"]=> int(1) ["str"]=> string(3) "222" ["bool"]=> bool(true) }



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn