3v4l.org

run code in 500+ PHP versions simultaneously
<?php class PhpstanOptions { private array $options = []; public function memoryLimit(string $limit): self { $this->options['memory-limit'] = $limit; return $this; } public function level(string $level): self { $this->options['level'] = $level; return $this; } public function noProgress(bool $progress): self { $this->options['no-progress'] = $progress; return $this; } public function debug(string $debug): self { $this->options['debug'] = $debug; return $this; } public function buildCliCommand(): string { $cmd = ''; foreach($this->options as $option => $val) { $cmd .= sprintf('--%s=%s ', $option, $val); } return $cmd; } } $options = new PhpstanOptions()->memoryLimit('1G')->level('5'); var_dump($options); echo $options->buildCliCommand();
Output for git.master_jit, git.master
object(PhpstanOptions)#1 (1) { ["options":"PhpstanOptions":private]=> array(2) { ["memory-limit"]=> string(2) "1G" ["level"]=> string(1) "5" } } --memory-limit=1G --level=5

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.42 ms | 493 KiB | 3 Q