3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $constants = get_defined_constants(); print_r(array_intersect_key($constants, array_flip(preg_grep('/^P(?:REG|CRE)_/', array_keys($constants)))));
based on GHPeT

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
Array ( [PREG_PATTERN_ORDER] => 1 [PREG_SET_ORDER] => 2 [PREG_OFFSET_CAPTURE] => 256 [PREG_UNMATCHED_AS_NULL] => 512 [PREG_SPLIT_NO_EMPTY] => 1 [PREG_SPLIT_DELIM_CAPTURE] => 2 [PREG_SPLIT_OFFSET_CAPTURE] => 4 [PREG_GREP_INVERT] => 1 [PREG_NO_ERROR] => 0 [PREG_INTERNAL_ERROR] => 1 [PREG_BACKTRACK_LIMIT_ERROR] => 2 [PREG_RECURSION_LIMIT_ERROR] => 3 [PREG_BAD_UTF8_ERROR] => 4 [PREG_BAD_UTF8_OFFSET_ERROR] => 5 [PREG_JIT_STACKLIMIT_ERROR] => 6 [PCRE_VERSION] => 10.31 2018-02-12 [PCRE_VERSION_MAJOR] => 10 [PCRE_VERSION_MINOR] => 31 [PCRE_JIT_SUPPORT] => 1 )
Output for Arrow functions
Array ( [PREG_PATTERN_ORDER] => 1 [PREG_SET_ORDER] => 2 [PREG_OFFSET_CAPTURE] => 256 [PREG_SPLIT_NO_EMPTY] => 1 [PREG_SPLIT_DELIM_CAPTURE] => 2 [PREG_SPLIT_OFFSET_CAPTURE] => 4 [PREG_GREP_INVERT] => 1 [PREG_NO_ERROR] => 0 [PREG_INTERNAL_ERROR] => 1 [PREG_BACKTRACK_LIMIT_ERROR] => 2 [PREG_RECURSION_LIMIT_ERROR] => 3 [PREG_BAD_UTF8_ERROR] => 4 [PREG_BAD_UTF8_OFFSET_ERROR] => 5 [PREG_JIT_STACKLIMIT_ERROR] => 6 [PCRE_VERSION] => 8.38 2015-11-23 )
Output for Object typehint
Array ( [PREG_PATTERN_ORDER] => 1 [PREG_SET_ORDER] => 2 [PREG_OFFSET_CAPTURE] => 256 [PREG_SPLIT_NO_EMPTY] => 1 [PREG_SPLIT_DELIM_CAPTURE] => 2 [PREG_SPLIT_OFFSET_CAPTURE] => 4 [PREG_GREP_INVERT] => 1 [PREG_NO_ERROR] => 0 [PREG_INTERNAL_ERROR] => 1 [PREG_BACKTRACK_LIMIT_ERROR] => 2 [PREG_RECURSION_LIMIT_ERROR] => 3 [PREG_BAD_UTF8_ERROR] => 4 [PREG_BAD_UTF8_OFFSET_ERROR] => 5 [PREG_JIT_STACKLIMIT_ERROR] => 6 [PCRE_VERSION] => 8.38 2015-11-23 )
Output for Array change keys
Array ( [PREG_PATTERN_ORDER] => 1 [PREG_SET_ORDER] => 2 [PREG_OFFSET_CAPTURE] => 256 [PREG_SPLIT_NO_EMPTY] => 1 [PREG_SPLIT_DELIM_CAPTURE] => 2 [PREG_SPLIT_OFFSET_CAPTURE] => 4 [PREG_GREP_INVERT] => 1 [PREG_NO_ERROR] => 0 [PREG_INTERNAL_ERROR] => 1 [PREG_BACKTRACK_LIMIT_ERROR] => 2 [PREG_RECURSION_LIMIT_ERROR] => 3 [PREG_BAD_UTF8_ERROR] => 4 [PREG_BAD_UTF8_OFFSET_ERROR] => 5 [PREG_JIT_STACKLIMIT_ERROR] => 6 [PCRE_VERSION] => 8.38 2015-11-23 )
Output for Lexical anon
Array ( [PREG_PATTERN_ORDER] => 1 [PREG_SET_ORDER] => 2 [PREG_OFFSET_CAPTURE] => 256 [PREG_SPLIT_NO_EMPTY] => 1 [PREG_SPLIT_DELIM_CAPTURE] => 2 [PREG_SPLIT_OFFSET_CAPTURE] => 4 [PREG_GREP_INVERT] => 1 [PREG_NO_ERROR] => 0 [PREG_INTERNAL_ERROR] => 1 [PREG_BACKTRACK_LIMIT_ERROR] => 2 [PREG_RECURSION_LIMIT_ERROR] => 3 [PREG_BAD_UTF8_ERROR] => 4 [PREG_BAD_UTF8_OFFSET_ERROR] => 5 [PCRE_VERSION] => 8.36 2014-09-26 )

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