3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo\Bar; class Foo { public function bar() { $closure = eval('return function ($__contextVariables__){unset($__contextVariables__);return function (){};};'); $closure = $closure->bindTo(new \stdClass(), '\stdClass'); var_dump($closure()); } } (new Foo)->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sRbJR
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $0      'Foo%5CBar%5CFoo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'bar'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class Foo\Bar\Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sRbJR
function name:  bar
number of ops:  15
compiled vars:  !0 = $closure
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INCLUDE_OR_EVAL                                  $1      'return+function+%28%24__contextVariables__%29%7Bunset%28%24__contextVariables__%29%3Breturn+function+%28%29%7B%7D%3B%7D%3B', EVAL
          1        ASSIGN                                                   !0, $1
    7     2        INIT_METHOD_CALL                                         !0, 'bindTo'
          3        NEW                                              $3      'stdClass'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $3
          6        SEND_VAL_EX                                              '%5CstdClass'
          7        DO_FCALL                                      0  $5      
          8        ASSIGN                                                   !0, $5
    8     9        INIT_NS_FCALL_BY_NAME                                    'Foo%5CBar%5Cvar_dump'
         10        INIT_DYNAMIC_CALL                                        !0
         11        DO_FCALL                                      0  $7      
         12        SEND_VAR_NO_REF_EX                                       $7
         13        DO_FCALL                                      0          
    9    14      > RETURN                                                   null

End of function bar

End of class Foo\Bar\Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.49 ms | 1395 KiB | 15 Q