1
adexbn 2015 年 11 月 9 日
Basics ¶
Variables in PHP are represented by a dollar sign followed by the name of the variable. The variable name is case-sensitive. Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' Note: For our purposes here, a letter is a-z, A-Z, and the bytes from 127 through 255 (0x7f-0xff). Note: $this is a special variable that can't be assigned. |
2
mrgeneral 2015 年 11 月 9 日
你是要 实现这样?
```php $a = 1; $b = 1; $c = '-'; echo $a.$c.$b;//1-1 echo eval("return {$a}{$c}{$b};");//0 ``` 但是 eval 函数在很多情况下会被禁用 |
3
widdy 2015 年 11 月 9 日
switch 吧
|
4
Automan 2015 年 11 月 9 日
自己动手撸个 parser
|