3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Das ist ein Test"; echo ereg_replace(" ist", " war", $string); echo ereg_replace("( )ist", "\\1war", $string); echo ereg_replace("(( )ist)", "\\2war", $string); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PKleE
function name:  (null)
number of ops:  20
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Das+ist+ein+Test'
    4     1        INIT_FCALL_BY_NAME                                       'ereg_replace'
          2        SEND_VAL_EX                                              '+ist'
          3        SEND_VAL_EX                                              '+war'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $2      
          6        ECHO                                                     $2
    5     7        INIT_FCALL_BY_NAME                                       'ereg_replace'
          8        SEND_VAL_EX                                              '%28+%29ist'
          9        SEND_VAL_EX                                              '%5C1war'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $3      
         12        ECHO                                                     $3
    6    13        INIT_FCALL_BY_NAME                                       'ereg_replace'
         14        SEND_VAL_EX                                              '%28%28+%29ist%29'
         15        SEND_VAL_EX                                              '%5C2war'
         16        SEND_VAR_EX                                              !0
         17        DO_FCALL                                      0  $4      
         18        ECHO                                                     $4
    8    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.31 ms | 1394 KiB | 13 Q