| 1 | <?php |
||
| 10 | class KintVariableData |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | public $type; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | public $access; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | public $name; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | public $operator; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var int |
||
| 34 | */ |
||
| 35 | public $size; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var kintVariableData[] array of kintVariableData objects or strings; displayed collapsed, each element from |
||
| 39 | * the array is a separate possible representation of the dumped var |
||
| 40 | */ |
||
| 41 | public $extendedValue; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @var string inline value |
||
| 45 | */ |
||
| 46 | public $value; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @var kintVariableData[] array of alternative representations for same variable, don't use in custom parsers |
||
| 50 | */ |
||
| 51 | public $_alternatives; |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @param string $value |
||
| 55 | * |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | 2 | protected static function _detectEncoding(&$value) |
|
| 62 | |||
| 63 | /** |
||
| 64 | * returns whether the array: |
||
| 65 | * 1) is numeric and |
||
| 66 | * 2) in sequence starting from zero |
||
| 67 | * |
||
| 68 | * @param array $array |
||
| 69 | * |
||
| 70 | * @return bool |
||
| 71 | */ |
||
| 72 | 2 | protected static function _isSequential(array &$array) |
|
| 76 | |||
| 77 | /** |
||
| 78 | * Get part of string |
||
| 79 | * |
||
| 80 | * @param string $string <p> |
||
| 81 | * The string being checked. |
||
| 82 | * </p> |
||
| 83 | * @param int $start <p> |
||
| 84 | * The first position used in str. |
||
| 85 | * </p> |
||
| 86 | * @param int $end [optional] <p> |
||
| 87 | * The maximum length of the returned string. |
||
| 88 | * </p> |
||
| 89 | * @param string $encoding [optional] &mbstring.encoding.parameter; |
||
| 90 | * |
||
| 91 | * @return string |
||
| 92 | */ |
||
| 93 | protected static function _substr($string, $start, $end = null, $encoding = null) |
||
| 101 | } |
||
| 102 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: