2
0

clioutput.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. require dirname(__DIR__) . '/vendor/autoload.php';
  3. use Michel\Debug\VarDumper;
  4. $data = [
  5. 'name' => 'John Doe',
  6. 'email' => 'john.doe@example.com',
  7. 'active' => true,
  8. 'roles' => ['admin', 'user'],
  9. 'file' => new SplFileInfo(__FILE__)
  10. ];
  11. dump($data);
  12. $data = new stdClass();
  13. $data->name = 'John Doe';
  14. $data->email = 'john.doe@example.com';
  15. $data->active = true;
  16. dump($data);
  17. dump(true);
  18. dump(false);
  19. $data = "Hello\nWorld\t😊";
  20. dump($data);
  21. $data = [
  22. 'string' => 'Hello world',
  23. 'int' => 42,
  24. 'float' => 3.14,
  25. 'boolTrue' => true,
  26. 'boolFalse' => false,
  27. 'nullValue' => null,
  28. 'arraySimple' => [1, 2, 3],
  29. 'arrayNested' => [
  30. 'level1' => [
  31. 'level2' => [
  32. 'level3a' => 'deep',
  33. 'level3b' => [4, 5, 6]
  34. ],
  35. 'level2b' => 'mid'
  36. ],
  37. 'anotherKey' => 'value'
  38. ],
  39. 'objectSimple' => (object)['foo' => 'bar', 'baz' => 123],
  40. ];
  41. $func = function () use ($data) {
  42. dd_bt($data);
  43. };
  44. $func();