3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str ="(hello)"; If(substr($str,0,1) == "(" || substr($str, -1) == ")") { // Replace string $str = "hello world"; } Echo $str;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 14
filename:       /in/g9iYc
function name:  (null)
number of ops:  18
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%28hello%29'
    4     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $2      
          6        IS_EQUAL                                         ~3      $2, '%28'
          7      > JMPNZ_EX                                         ~3      ~3, ->14
          8    >   INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 -1
         11        DO_ICALL                                         $4      
         12        IS_EQUAL                                         ~5      $4, '%29'
         13        BOOL                                             ~3      ~5
         14    > > JMPZ                                                     ~3, ->16
    6    15    >   ASSIGN                                                   !0, 'hello+world'
    8    16    >   ECHO                                                     !0
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.04 ms | 1004 KiB | 14 Q