This file contains 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 | |
namespace Example; | |
$a = 23; | |
\is_null($a); |
This file contains 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 | |
declare(strict_types=1); | |
namespace Serafim\MemProf\Zend; | |
use FFI\Contracts\Preprocessor\Exception\DirectiveDefinitionExceptionInterface; | |
use FFI\Contracts\Preprocessor\Exception\PreprocessorExceptionInterface; | |
use FFI\Contracts\Preprocessor\PreprocessorInterface; | |
use FFI\Preprocessor\Preprocessor; |
This file contains 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 | |
/** | |
* @template TArgStart | |
* @template TArgResume | |
* @template TArgReturn | |
* @template TArgSuspend | |
* | |
* @param \Fiber<TArgStart, TArgResume, TArgReturn, TArgSuspend> $fiber | |
* @param TArgStart ...$args | |
* @return \Generator<array-key, TArgResume, TArgReturn, TArgSuspend> |
This file contains 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
benchInt8 | |
+-----------+------+---------+---------+ | |
| benchmark | set | mode | rstdev | | |
+-----------+------+---------+---------+ | |
| PackBench | raw | 0.972μs | ±22.36% | | |
| PackBench | pack | 1.336μs | ±25.69% | | |
+-----------+------+---------+---------+ | |
benchUInt8 | |
+-----------+------+---------+---------+ |
This file contains 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 | |
namespace Bench; | |
use PhpBench\Attributes\BeforeMethods; | |
use PhpBench\Attributes\Iterations; | |
use PhpBench\Attributes\Revs; | |
use PhpBench\Attributes\Warmup; | |
#[Revs(100000), Warmup(2), Iterations(5)] |
This file contains 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 | |
class Example | |
{ | |
public function __construct( | |
public ?string $value = null, | |
) { | |
} | |
} | |
/** @var Example $object */ |
This file contains 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 | |
function file_get_contents(string $pathname): string | |
{ | |
$result = ''; | |
$fp = fopen($pathname, 'rb'); | |
while (!feof($fp)) { | |
$chunk = 1024; | |
Fiber::getCurrent() && ($chunk = (Fiber::suspend() ?: 1024)); |
This file contains 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 | |
$variable = 23; | |
[$query, $params] = sql(fn() => <<<SQL | |
SELECT * FROM users WHERE id = ${yield $variable} OR id = ${yield 42} | |
SQL); | |
var_dump($query, $params); | |
// |
This file contains 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
#Steps to merge/close pull requests with two main branches | |
As NiFi now has a 1.0 (master) and 0.x (support) branch, pull requests (PR) must be applied to both. Here is a step-by-step guide for committers to ensure this occurs for all PRs. | |
1. Check out the latest master | |
``` $ git checkout master | |
$ git pull upstream master | |
``` | |
2. Check out the PR (example #327). This will be in `detached-HEAD` state. (Note: You may need to edit the `.git/config` file to add the `fetch` lines [below](#fetch)) |
This file contains 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 | |
declare(strict_types=1); | |
interface DecoratorInterface | |
{ | |
public static function handle(\Reflector $context, self $instance): void; | |
} |
NewerOlder