3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
264.32 ms | 1396 KiB | 20 Q