3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Toggle regex JIT: $iniSetSuccessfully = ini_set( "pcre.jit", "1" ); if ( $iniSetSuccessfully === false ) { throw new \Exception( "Unable to set pcre.jit" ); } // Test echo "\nTest with JIT enabled:\n"; preg_match( '/<(\w+)[\s\w\-]+ id="S44_i89ew">/', '<br><div id="S44_i89ew">', $matches ); var_dump( $matches ); // PCRE info ( not available on 3v4l.org ) $pcreReflector = new ReflectionExtension("pcre"); $pcreReflector->info(); $iniSetSuccessfully = ini_set( "pcre.jit", "0" ); if ( $iniSetSuccessfully === false ) { throw new \Exception( "Unable to set pcre.jit" ); } echo "\nTest with JIT disabled:\n"; // Test ( Note regex must be changed to prevent caching ) preg_match( '/<(\w+)[\s\w\-]+ id="S44_123">/', '<br><div id="S44_123">', $matches ); var_dump( $matches ); // PCRE info $pcreReflector = new ReflectionExtension("pcre"); $pcreReflector->info();
Output for 8.4.1 - 8.4.11
Test with JIT enabled: array(2) { [0]=> string(20) "<div id="S44_i89ew">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.44 2024-06-07 PCRE Unicode Version => 15.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => On => On Test with JIT disabled: array(2) { [0]=> string(18) "<div id="S44_123">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.44 2024-06-07 PCRE Unicode Version => 15.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => Off => On
Output for 8.3.0 - 8.3.24
Test with JIT enabled: array(2) { [0]=> string(20) "<div id="S44_i89ew">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.42 2022-12-12 PCRE Unicode Version => 14.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => On => On Test with JIT disabled: array(2) { [0]=> string(18) "<div id="S44_123">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.42 2022-12-12 PCRE Unicode Version => 14.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => Off => On
Output for 8.2.12 - 8.2.29
Test with JIT enabled: array(2) { [0]=> string(20) "<div id="S44_i89ew">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.40 2022-04-14 PCRE Unicode Version => 14.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => On => On Test with JIT disabled: array(2) { [0]=> string(18) "<div id="S44_123">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.40 2022-04-14 PCRE Unicode Version => 14.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => Off => On
Output for 8.2.0 - 8.2.11
Test with JIT enabled: array(0) { } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.40 2022-04-14 PCRE Unicode Version => 14.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => On => On Test with JIT disabled: array(2) { [0]=> string(18) "<div id="S44_123">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.40 2022-04-14 PCRE Unicode Version => 14.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => Off => On
Output for 8.1.25 - 8.1.33
Test with JIT enabled: array(2) { [0]=> string(20) "<div id="S44_i89ew">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.39 2021-10-29 PCRE Unicode Version => 14.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => 1 => 1 Test with JIT disabled: array(2) { [0]=> string(18) "<div id="S44_123">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.39 2021-10-29 PCRE Unicode Version => 14.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => 0 => 1
Output for 8.1.1 - 8.1.24
Test with JIT enabled: array(0) { } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.39 2021-10-29 PCRE Unicode Version => 14.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => 1 => 1 Test with JIT disabled: array(2) { [0]=> string(18) "<div id="S44_123">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.39 2021-10-29 PCRE Unicode Version => 14.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => 0 => 1
Output for 8.1.0
Test with JIT enabled: array(0) { } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.37 2021-05-26 PCRE Unicode Version => 13.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => 1 => 1 Test with JIT disabled: array(2) { [0]=> string(18) "<div id="S44_123">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.37 2021-05-26 PCRE Unicode Version => 13.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => 0 => 1
Output for 8.0.1 - 8.0.30
Test with JIT enabled: array(2) { [0]=> string(20) "<div id="S44_i89ew">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.35 2020-05-09 PCRE Unicode Version => 13.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => 1 => 1 Test with JIT disabled: array(2) { [0]=> string(18) "<div id="S44_123">" [1]=> string(2) "di" } pcre PCRE (Perl Compatible Regular Expressions) Support => enabled PCRE Library Version => 10.35 2020-05-09 PCRE Unicode Version => 13.0.0 PCRE JIT Support => enabled PCRE JIT Target => x86 64bit (little endian + unaligned) Directive => Local Value => Master Value pcre.backtrack_limit => 1000000 => 1000000 pcre.recursion_limit => 100000 => 100000 pcre.jit => 0 => 1

preferences:
74.03 ms | 429 KiB | 5 Q