3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function method() { $code = 'var_dump(isset($this));'; $evUl = function()use($code){ eval($code); }; $evUl = $evUl->bindTo(null); $evUl(); } } $foo = new foo(); $foo->method();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQ1U0
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'method'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FTQ1U0%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQ1U0
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   BIND_STATIC                                              !0
          1        INCLUDE_OR_EVAL                                          !0, EVAL
          2      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FTQ1U0%3A7%240

Class foo:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQ1U0
function name:  method
number of ops:  11
compiled vars:  !0 = $code, !1 = $evUl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'var_dump%28isset%28%24this%29%29%3B'
    7     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FTQ1U0%3A7%240'
          2        BIND_LEXICAL                                             ~3, !0
          3        ASSIGN                                                   !1, ~3
    8     4        INIT_METHOD_CALL                                         !1, 'bindTo'
          5        SEND_VAL_EX                                              null
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
    9     8        INIT_DYNAMIC_CALL                                        !1
          9        DO_FCALL                                      0          
   10    10      > RETURN                                                   null

End of function method

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.33 ms | 1394 KiB | 13 Q