3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $a='data'; protected $b=123; public $c=true; } $a = new Test; $hydrated = (new ReflectionFunction('get_object_vars'))->getClosure()->bindTo($a, 'Test'); $data = $hydrated();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mqHa4
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $hydrated, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $3      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   12     3        NEW                                              $6      'ReflectionFunction'
          4        SEND_VAL_EX                                              'get_object_vars'
          5        DO_FCALL                                      0          
          6        INIT_METHOD_CALL                                         $6, 'getClosure'
          7        DO_FCALL                                      0  $8      
          8        INIT_METHOD_CALL                                         $8, 'bindTo'
          9        SEND_VAR_EX                                              !0
         10        SEND_VAL_EX                                              'Test'
         11        DO_FCALL                                      0  $9      
         12        ASSIGN                                                   !1, $9
   13    13        INIT_DYNAMIC_CALL                                        !1
         14        DO_FCALL                                      0  $11     
         15        ASSIGN                                                   !2, $11
         16      > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.57 ms | 1393 KiB | 13 Q