dumb-var.php 817 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Symfony\Component\VarDumper\Tests\Fixture;
  3. if (!class_exists('Symfony\Component\VarDumper\Tests\Fixture\DumbFoo')) {
  4. class DumbFoo
  5. {
  6. public $foo = 'foo';
  7. }
  8. }
  9. $foo = new DumbFoo();
  10. $foo->bar = 'bar';
  11. $g = fopen(__FILE__, 'r');
  12. $var = array(
  13. 'number' => 1, null,
  14. 'const' => 1.1, true, false, NAN, INF, -INF, PHP_INT_MAX,
  15. 'str' => "déjà\n", "\xE9\x00",
  16. '[]' => array(),
  17. 'res' => $g,
  18. 'obj' => $foo,
  19. 'closure' => function ($a, \PDO &$b = null) {},
  20. 'line' => __LINE__ - 1,
  21. 'nobj' => array((object) array()),
  22. );
  23. $r = array();
  24. $r[] = &$r;
  25. $var['recurs'] = &$r;
  26. $var[] = &$var[0];
  27. $var['sobj'] = $var['obj'];
  28. $var['snobj'] = &$var['nobj'][0];
  29. $var['snobj2'] = $var['nobj'][0];
  30. $var['file'] = __FILE__;
  31. $var["bin-key-\xE9"] = '';
  32. unset($g, $r);