3v4l.org

run code in 150+ 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
Output for 7.0.3 - 7.1.0
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 7.0.0 - 7.0.2
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.37 2015-04-28 )
Output for hhvm-3.12.0
Array ( [PREG_SPLIT_NO_EMPTY] => 1 [PREG_SPLIT_OFFSET_CAPTURE] => 4 [PREG_OFFSET_CAPTURE] => 256 [PREG_PATTERN_ORDER] => 1 [PREG_BACKTRACK_LIMIT_ERROR] => 2 [PREG_BAD_UTF8_ERROR] => 4 [PREG_GREP_INVERT] => 1 [PREG_BAD_UTF8_OFFSET_ERROR] => 5 [PREG_SPLIT_DELIM_CAPTURE] => 2 [PREG_RECURSION_LIMIT_ERROR] => 3 [PREG_SET_ORDER] => 2 [PREG_NO_ERROR] => 0 [PREG_INTERNAL_ERROR] => 1 [PCRE_VERSION] => 8.38 2015-11-23 )
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.5.32 - 5.5.35, 5.6.18 - 5.6.28
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.38 2015-11-23 )
Output for 5.4.43 - 5.4.45, 5.5.27 - 5.5.31, 5.6.11 - 5.6.17
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.37 2015-04-28 )
Output for 5.4.41 - 5.4.42, 5.5.25 - 5.5.26, 5.6.9 - 5.6.10
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 )
Output for 5.5.24, 5.6.7 - 5.6.8
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.34 2013-12-15 )
Output for 5.3.24 - 5.3.29, 5.4.14 - 5.4.40
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.32 2012-11-30 )
Output for 5.3.19 - 5.3.23, 5.4.9 - 5.4.13
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.31 2012-07-06 )
Output for 5.3.7 - 5.3.18, 5.4.0 - 5.4.8
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.12 2011-01-15 )
Output for 5.3.6
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.11 2010-12-10 )
Output for 5.3.4 - 5.3.5
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.10 2010-06-25 )
Output for 5.2.14 - 5.2.17, 5.3.3
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.02 2010-03-19 )
Output for 5.3.2
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.00 2009-10-19 )
Output for 5.2.10 - 5.2.13, 5.3.0 - 5.3.1
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] => 7.9 2009-04-11 )
Output for 5.2.9
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] => 7.8 2008-09-05 )
Output for 5.2.7 - 5.2.8
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 [PCRE_VERSION] => 7.8 2008-09-05 )
Output for 5.2.6
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 [PCRE_VERSION] => 7.6 2008-01-28 )
Output for 5.2.5
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 [PCRE_VERSION] => 7.3 2007-08-28 )
Output for 5.2.4
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 [PCRE_VERSION] => 7.2 2007-06-19 )
Output for 5.2.0 - 5.2.3
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 )
Output for 5.1.0 - 5.1.6
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 )
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function array_intersect_key() in /in/YmKrI on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_intersect_key() in /in/YmKrI on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_intersect_key() in /in/YmKrI on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_intersect_key() in /in/YmKrI on line 3