This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* This demo replaces all unqualified function calls and namespaced lookups | |
* with fully qualified ones. Apart from this change all formatting should | |
* be preserved. */ | |
use PhpParser\Lexer; | |
use PhpParser\Parser; | |
use PhpParser\NodeTraverser; | |
use PhpParser\NodeVisitor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JIT$$interrupt_handler: ; (unknown) | |
mov $0x0, EG(vm_interrupt) | |
cmp $0x0, EG(timed_out) | |
jz .L1 | |
xor %edi, %edi | |
call zend_timeout | |
.L1: | |
add $0x8, %rsp | |
jmp (%r15) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c | |
index 308437e..ebc4d1e 100644 | |
--- a/ext/date/lib/parse_tz.c | |
+++ b/ext/date/lib/parse_tz.c | |
@@ -438,7 +438,7 @@ static struct location_info **create_location_table(void) | |
return NULL; | |
} | |
- li = timelib_calloc(LOCINFO_HASH_SIZE, sizeof *li); | |
+ li = calloc(LOCINFO_HASH_SIZE, sizeof *li); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php error_reporting(E_ALL); | |
function formatT($t) { | |
return sprintf('%.1f mus', $t * 1000000); | |
} | |
function formatResult($result) { | |
list($mean, $stddev) = $result; | |
return formatT($mean) . " +/- " . formatT($stddev); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php error_reporting(E_ALL); | |
class BinaryTree { | |
private $content, $left, $right; | |
public function __construct($content, BinaryTree $left = null, BinaryTree $right = null) { | |
$this->content = $content; | |
$this->left = $left; | |
$this->right = $right; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require './vendor/autoload.php'; | |
// The code samples to parse. | |
// => bool(false) | |
$code = '<?php class Foo {public $bar;}'; | |
// => bool(true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h | |
index 2a1582c..b571ee1 100644 | |
--- a/Zend/zend_ast.h | |
+++ b/Zend/zend_ast.h | |
@@ -115,6 +115,7 @@ enum _zend_ast_kind { | |
ZEND_AST_NEW, | |
ZEND_AST_INSTANCEOF, | |
ZEND_AST_YIELD, | |
+ ZEND_AST_COALESCE, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php ini_set('memory_limit', -1); | |
if ($argc != 3) die("error\n"); | |
$file = $argv[1]; | |
$num = $argv[2]; | |
$startTime = microtime(true); | |
for ($i = 0; $i < $num; ++$i) { | |
require $file; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PhpParser\Node; | |
use PhpParser\Node\Expr; | |
error_reporting(E_ALL); | |
ini_set('memory_limit', -1); | |
//$dir = __DIR__ . '/../../Symfony_2.3'; |