3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = '/(((?!a).)*)*a\\{/'; $test_string = 'AAAAAAAAAAAAAA{AA'; echo "1:".mb_ereg_replace($regex,'WORKED',$test_string)."\n"; 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/hi4nR
function name:  (null)
number of ops:  28
compiled vars:  !0 = $regex, !1 = $test_string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2F%28%28%28%3F%21a%29.%29%2A%29%2Aa%5C%7B%2F'
    3     1        ASSIGN                                                   !1, 'AAAAAAAAAAAAAA%7BAA'
    4     2        INIT_FCALL                                               'mb_ereg_replace'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'WORKED'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $4      
          7        CONCAT                                           ~5      '1%3A', $4
          8        CONCAT                                           ~6      ~5, '%0A'
          9        ECHO                                                     ~6
    5    10        INIT_FCALL                                               'preg_replace'
         11        CONCAT                                           ~7      !0, 'u'
         12        SEND_VAL                                                 ~7
         13        SEND_VAL                                                 'WORKED'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $8      
         16        CONCAT                                           ~9      '2%3A', $8
         17        CONCAT                                           ~10     ~9, '%0A'
         18        ECHO                                                     ~10
    6    19        INIT_FCALL                                               'preg_replace'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 'WORKED'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $11     
         24        CONCAT                                           ~12     '3%3A', $11
         25        CONCAT                                           ~13     ~12, '%0A'
         26        ECHO                                                     ~13
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.7 ms | 1387 KiB | 17 Q