rfc:const_scalar_expressions
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
rfc:const_scalar_expressions [2013/08/13 16:09] – created ircmaxell | rfc:const_scalar_expressions [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2013-08-13 | * Date: 2013-08-13 | ||
* Author: Anthony Ferrara < | * Author: Anthony Ferrara < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 35: | Line 35: | ||
Also supported is grouping static operations: //(1 + 2) + 3//. | Also supported is grouping static operations: //(1 + 2) + 3//. | ||
+ | |||
+ | ==== Supported Operands ==== | ||
+ | |||
+ | * //123// - Integers | ||
+ | * //123.456// - Floats | ||
+ | * //" | ||
+ | * //< | ||
+ | * //< | ||
+ | * //< | ||
+ | * //< | ||
+ | * //< | ||
+ | * //< | ||
+ | * //< | ||
+ | * //< | ||
==== Constant Declarations ==== | ==== Constant Declarations ==== | ||
Line 72: | Line 86: | ||
" | " | ||
]; | ]; | ||
+ | public $baseDir = __DIR__ . "/ | ||
} | } | ||
?> | ?> | ||
Line 90: | Line 105: | ||
<?php | <?php | ||
function foo() { | function foo() { | ||
- | static $a = 1 + 1; | + | static $a = 1 + 1 |
- | static $b = [ 1 << 2 ]; | + | static $b = [ 1 << 2 ]; |
} | } | ||
?> | ?> | ||
Line 129: | Line 144: | ||
This patch is ready to be merged with tests. | This patch is ready to be merged with tests. | ||
- |
rfc/const_scalar_expressions.1376410179.txt.gz · Last modified: 2017/09/22 13:28 (external edit)