3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface PatternInterface { function match($value); } class LiteralPattern implements PatternInterface { private $value; public function match($value) { return $value === $this->value; } } class DynamicPattern implements PatternInterface { private $name; private $value; public function match($value, &$matches) { return (bool) preg_match($this->getExpression(), $value, $matches); // i can has $matches? } public function getExpression() { return sprintf('/^(?<%s>%s)$/', $this->name, $this->value); } }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Declaration of DynamicPattern::match($value, &$matches) must be compatible with PatternInterface::match($value) in /in/d5IUJ on line 24
Process exited with code 255.

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:
34.2 ms | 401 KiB | 8 Q