Yesterday I found some people on my [favorite reddit][lolphp] wonder about the output of the following code:
<?php
$a = 1;
$c = $a + $a++;
<?php | |
use PhpParser\Node; | |
$IN_DIR = __DIR__ . '/in_dir'; | |
$OUT_FILE = __DIR__ . '/out_file.php'; | |
require __DIR__ . '/../lib/bootstrap.php'; | |
class CompressVisitor extends PhpParser\NodeVisitorAbstract { |
<?php | |
error_reporting(E_ALL); | |
require __DIR__ . '/FastRoute/src/bootstrap.php'; | |
spl_autoload_register(function ($class) { | |
require __DIR__ . '/Pux/src/' . strtr($class, '\\', '/') . '.php'; | |
}); |
~^(?|/a/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)|/b/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)()|/c/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)()()|/d/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)()()()|/e/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)()()()()|/f/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)()()()()()|/g/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)()()()()()()|/h/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)()()()()()()()|/i/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)()()()()()()()()|/j/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)()()()()()()()()()|/k/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)()()()()()()()()()()|/l/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)()()()()() |
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c | |
index 25a604c..4dba71b 100644 | |
--- a/Zend/zend_compile.c | |
+++ b/Zend/zend_compile.c | |
@@ -1737,7 +1737,6 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n | |
zend_op dummy_opline; | |
dummy_opline.result_type = IS_UNUSED; | |
- dummy_opline.op1_type = IS_UNUSED; | |
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c | |
index 63ecbe4..c79a551 100644 | |
--- a/Zend/zend_execute.c | |
+++ b/Zend/zend_execute.c | |
@@ -94,7 +94,7 @@ static zend_always_inline void zend_pzval_unlock_free_func(zval *z TSRMLS_DC) | |
} | |
#undef zval_ptr_dtor | |
-#define zval_ptr_dtor(pzv) i_zval_ptr_dtor(*(pzv) ZEND_FILE_LINE_CC) | |
+#define zval_ptr_dtor(pzv) i_zval_ptr_dtor(*(pzv) ZEND_FILE_LINE_CC TSRMLS_CC) |
<?php | |
$numElements = 10000000; | |
// Test end() performance | |
$array = [array_fill(0, $numElements, null)]; | |
$startTime = microtime(true); | |
$return = end($array); |
<?php error_reporting(E_ALL); | |
function test() {} | |
$nIter = 1000000; | |
$argNums = [0, 1, 2, 3, 4, 5, 100]; | |
$func = 'test'; | |
foreach ($argNums as $argNum) { |
PHP.net archives: http://news.php.net/php.internals (not searchable, no threads)
Markmail: http://markmail.org/search/?q=list%3Anet.php.lists.internals (usually a lot better)
This is only a summary. For a full list of changes see the NEWS file.
Feature | RFC / announcement | Author |
---|---|---|
Bundled ZendOptimizer+ as OPcache | https://wiki.php.net/rfc/optimizerplus | zeev |