3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ""; function foo() { return "bar"; } $eval = '$a = ' .foo() . ';'; var_dump($eval); eval($eval); echo $a;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ISKsV
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $eval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    9     1        INIT_FCALL                                               'foo'
          2        DO_FCALL                                      0  $3      
          3        CONCAT                                           ~4      '%24a+%3D+', $3
          4        CONCAT                                           ~5      ~4, '%3B'
          5        ASSIGN                                                   !1, ~5
   10     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   12     9        INCLUDE_OR_EVAL                                          !1, EVAL
   14    10        ECHO                                                     !0
         11      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ISKsV
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'bar'
    7     1*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.93 ms | 1397 KiB | 16 Q