3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decodeString($string){ $foo = "foo1"; $string = str_replace("foo", $foo, $string); return $string; } $foo = "hello foo world"; var_dump(decodeString($foo));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JK8IE
function name:  (null)
number of ops:  8
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 'hello+foo+world'
    8     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'decodestring'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function decodestring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JK8IE
function name:  decodeString
number of ops:  10
compiled vars:  !0 = $string, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, 'foo1'
    4     2        INIT_FCALL                                               'str_replace'
          3        SEND_VAL                                                 'foo'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
    5     8      > RETURN                                                   !0
    6     9*     > RETURN                                                   null

End of function decodestring

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.32 ms | 1397 KiB | 18 Q