Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

README.md

Zuletzt modifiziert: 09.10.2024, 12:57 - Dateigröße: 2.92 KiB


001  Symfony Debug Extension for PHP 5
002  =================================
003   
004  This extension publishes several functions to help building powerful debugging tools.
005  It is compatible with PHP 5.3, 5.4, 5.5 and 5.6; with ZTS and non-ZTS modes.
006  It is not required thus not provided for PHP 7.
007   
008  symfony_zval_info()
009  -------------------
010   
011  - exposes zval_hash/refcounts, allowing e.g. efficient exploration of arbitrary structures in PHP,
012  - does work with references, preventing memory copying.
013   
014  Its behavior is about the same as:
015   
016  ```php
017  <?php
018   
019  function symfony_zval_info($key, $array, $options = 0)
020  {
021   
022      // $options is currently not used, but could be in future version.
023   
024      if (!array_key_exists($key, $array)) {
025          return null;
026      }
027   
028      $info = array(
029          'type' => gettype($array[$key]),
030          'zval_hash' => /* hashed memory address of $array[$key] */,
031          'zval_refcount' => /* internal zval refcount of $array[$key] */,
032          'zval_isref' => /* is_ref status of $array[$key] */,
033      );
034   
035      switch ($info['type']) {
036          case 'object':
037              $info += array(
038                  'object_class' => get_class($array[$key]),
039                  'object_refcount' => /* internal object refcount of $array[$key] */,
040                  'object_hash' => spl_object_hash($array[$key]),
041                  'object_handle' => /* internal object handle $array[$key] */,
042              );
043              break;
044   
045          case 'resource':
046              $info += array(
047                  'resource_handle' => (int) $array[$key],
048                  'resource_type' => get_resource_type($array[$key]),
049                  'resource_refcount' => /* internal resource refcount of $array[$key] */,
050              );
051              break;
052   
053          case 'array':
054              $info += array(
055                  'array_count' => count($array[$key]),
056              );
057              break;
058   
059          case 'string':
060              $info += array(
061                  'strlen' => strlen($array[$key]),
062              );
063              break;
064      }
065   
066      return $info;
067  }
068  ```
069   
070  symfony_debug_backtrace()
071  -------------------------
072   
073  This function works like debug_backtrace(), except that it can fetch the full backtrace in case of fatal errors:
074   
075  ```php
076  function foo() { fatal(); }
077  function bar() { foo(); }
078   
079  function sd() { var_dump(symfony_debug_backtrace()); }
080   
081  register_shutdown_function('sd');
082   
083  bar();
084   
085  /* Will output
086  Fatal error: Call to undefined function fatal() in foo.php on line 42
087  array(3) {
088    [0]=>
089    array(2) {
090      ["function"]=>
091      string(2) "sd"
092      ["args"]=>
093      array(0) {
094      }
095    }
096    [1]=>
097    array(4) {
098      ["file"]=>
099      string(7) "foo.php"
100      ["line"]=>
101      int(1)
102      ["function"]=>
103      string(3) "foo"
104      ["args"]=>
105      array(0) {
106      }
107    }
108    [2]=>
109    array(4) {
110      ["file"]=>
111      string(102) "foo.php"
112      ["line"]=>
113      int(2)
114      ["function"]=>
115      string(3) "bar"
116      ["args"]=>
117      array(0) {
118      }
119    }
120  }
121  */
122  ```
123   
124  Usage
125  -----
126   
127  To enable the extension from source, run:
128   
129  ```
130      phpize
131      ./configure
132      make
133      sudo make install
134  ```
135