3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "ab"; echo preg_replace("/(a)|(b)/", "(+${2}+)(-$1-)", $a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9g8lg
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ab'
    5     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28a%29%7C%28b%29%2F'
          3        ROPE_INIT                                     3  ~4      '%28%2B'
          4        ROPE_ADD                                      1  ~4      ~4, !1
          5        ROPE_END                                      2  ~3      ~4, '%2B%29%28-%241-%29'
          6        SEND_VAL                                                 ~3
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        ECHO                                                     $6
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.48 ms | 1394 KiB | 15 Q