3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $a = 23; protected $b = 42; private $c = 666; public function exposeMe() { return get_object_vars($this); } } $foo = new Foo(); var_dump($foo->exposeMe()); $expose = function() { return get_object_vars($this); }; $fooExpose = $expose->bindTo($foo); var_dump($fooExpose());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6ONUs
function name:  (null)
number of ops:  20
compiled vars:  !0 = $foo, !1 = $expose, !2 = $fooExpose
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   15     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'exposeMe'
          5        DO_FCALL                                      0  $6      
          6        SEND_VAR                                                 $6
          7        DO_ICALL                                                 
   18     8        DECLARE_LAMBDA_FUNCTION                          ~8      [0]
          9        ASSIGN                                                   !1, ~8
   22    10        INIT_METHOD_CALL                                         !1, 'bindTo'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $10     
         13        ASSIGN                                                   !2, $10
   24    14        INIT_FCALL                                               'var_dump'
         15        INIT_DYNAMIC_CALL                                        !2
         16        DO_FCALL                                      0  $12     
         17        SEND_VAR                                                 $12
         18        DO_ICALL                                                 
         19      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6ONUs
function name:  {closure}
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'get_object_vars'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   20     5*     > RETURN                                                   null

End of Dynamic Function 0

Class Foo:
Function exposeme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6ONUs
function name:  exposeMe
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'get_object_vars'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   11     5*     > RETURN                                                   null

End of function exposeme

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143 ms | 1004 KiB | 15 Q