3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class Deployment { /** * @param array<string, list<string>> $pipelineStages */ public function run(array $pipelineStages): void { $pipeline = new Fiber(function (array $pipelineStages): string { Fiber::suspend('Pipeline initialized.'); foreach ($pipelineStages as $stage => $steps) { foreach ($steps as $step) { Fiber::suspend("Stage '{$stage}': step '{$step}' completed."); } } return 'Deployment successful.'; }); $monitor = new Fiber(function (): string { Fiber::suspend('Monitoring system initialized.'); while (true) { Fiber::suspend('System health: OK.'); } }); $pipeline->start($pipelineStages); $monitor->start(); while (! $pipeline->isTerminated()) { printf("[Pipeline] %s\n", $pipeline->resume()); printf("[Monitor] %s\n", $monitor->resume()); } $result = $pipeline->getReturn(); printf("[Result] %s\n", $result); } } $stages = [ 'build' => ['compile', 'lint', 'optimize'], 'test' => ['unit', 'integration', 'e2e'], 'package' => ['zip', 'sign'], 'deploy' => ['upload', 'release', 'notify'], ]; (new Deployment())->run($stages);
Output for git.master_jit, git.master
[Pipeline] Stage 'build': step 'compile' completed. [Monitor] System health: OK. [Pipeline] Stage 'build': step 'lint' completed. [Monitor] System health: OK. [Pipeline] Stage 'build': step 'optimize' completed. [Monitor] System health: OK. [Pipeline] Stage 'test': step 'unit' completed. [Monitor] System health: OK. [Pipeline] Stage 'test': step 'integration' completed. [Monitor] System health: OK. [Pipeline] Stage 'test': step 'e2e' completed. [Monitor] System health: OK. [Pipeline] Stage 'package': step 'zip' completed. [Monitor] System health: OK. [Pipeline] Stage 'package': step 'sign' completed. [Monitor] System health: OK. [Pipeline] Stage 'deploy': step 'upload' completed. [Monitor] System health: OK. [Pipeline] Stage 'deploy': step 'release' completed. [Monitor] System health: OK. [Pipeline] Stage 'deploy': step 'notify' completed. [Monitor] System health: OK. [Pipeline] [Monitor] System health: OK. [Result] Deployment successful.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
33.81 ms | 408 KiB | 5 Q