3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = '((?!a).*)a\{'; $test_string = 'AAAAAAAAAAAAAA{AA'; echo "2:".preg_replace('/'.$regex.'/u','WORKED',$test_string)."\n"; echo "3:".preg_replace('/'.$regex.'/','WORKED',$test_string)."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AjerC
function name:  (null)
number of ops:  23
compiled vars:  !0 = $regex, !1 = $test_string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%28%28%3F%21a%29.%2A%29a%5C%7B'
    3     1        ASSIGN                                                   !1, 'AAAAAAAAAAAAAA%7BAA'
    4     2        INIT_FCALL                                               'preg_replace'
          3        CONCAT                                           ~4      '%2F', !0
          4        CONCAT                                           ~5      ~4, '%2Fu'
          5        SEND_VAL                                                 ~5
          6        SEND_VAL                                                 'WORKED'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $6      
          9        CONCAT                                           ~7      '2%3A', $6
         10        CONCAT                                           ~8      ~7, '%0A'
         11        ECHO                                                     ~8
    5    12        INIT_FCALL                                               'preg_replace'
         13        CONCAT                                           ~9      '%2F', !0
         14        CONCAT                                           ~10     ~9, '%2F'
         15        SEND_VAL                                                 ~10
         16        SEND_VAL                                                 'WORKED'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $11     
         19        CONCAT                                           ~12     '3%3A', $11
         20        CONCAT                                           ~13     ~12, '%0A'
         21        ECHO                                                     ~13
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.51 ms | 1395 KiB | 15 Q