3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public const FILENAME_REGEX = <<<REGEX (("([^"]+)")|('([^']+)')|([\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+)) REGEX; } echo Foo::FILENAME_REGEX.PHP_EOL; class Bar { public const FILENAME_REGEX = <<<REGEX (("([^"]+)")|('([^']+)')|([\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2E\\x30-\\x39\\x41-\\x5A\\x5E-\\x7E]+)) REGEX; } echo Bar::FILENAME_REGEX.PHP_EOL;
Output for git.master_jit, git.master
(("([^"]+)")|('([^']+)')|([!#-'*+-.0-9A-Z^-~]+)) (("([^"]+)")|('([^']+)')|([\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7E]+))

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.01 ms | 405 KiB | 5 Q