| 1 | <?php |
||
| 16 | class Lua { |
||
| 17 | public static $luaKeywords = [ |
||
| 18 | 'and', |
||
| 19 | 'break', |
||
| 20 | 'do', |
||
| 21 | 'else', |
||
| 22 | 'elseif', |
||
| 23 | 'end', |
||
| 24 | 'false', |
||
| 25 | 'for', |
||
| 26 | 'function', |
||
| 27 | 'if', |
||
| 28 | 'in', |
||
| 29 | 'local', |
||
| 30 | 'nil', |
||
| 31 | 'not', |
||
| 32 | 'or', |
||
| 33 | 'repeat', |
||
| 34 | 'return', |
||
| 35 | 'then', |
||
| 36 | 'true', |
||
| 37 | 'until', |
||
| 38 | 'while', |
||
| 39 | ]; |
||
| 40 | |||
| 41 | public static function serialize($data) { |
||
| 44 | |||
| 45 | public static function deserialize($data) { |
||
| 49 | } |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: