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 git.master, git.master_jit
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 rfc.property-hooks
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.43 2024-02-16 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.43 2024-02-16 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

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:
40.15 ms | 410 KiB | 5 Q