3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DummyClass {private $value = 1;} // Before PHP 7 $getValueCallBack = function() {return $this->value;}; $getValue = $getValueCallBack->bindTo(new DummyClass, 'DummyClass'); echo $getValue(); // From PHP 7 $getvalue = function() {return $this->value;}; echo $getValue->call(new DummyClass);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YKtPC
function name:  (null)
number of ops:  21
compiled vars:  !0 = $getValueCallBack, !1 = $getValue, !2 = $getvalue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          1        ASSIGN                                                   !0, ~3
    7     2        INIT_METHOD_CALL                                         !0, 'bindTo'
          3        NEW                                              $5      'DummyClass'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $5
          6        SEND_VAL_EX                                              'DummyClass'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !1, $7
    8     9        INIT_DYNAMIC_CALL                                        !1
         10        DO_FCALL                                      0  $9      
         11        ECHO                                                     $9
   11    12        DECLARE_LAMBDA_FUNCTION                          ~10     [1]
         13        ASSIGN                                                   !2, ~10
   12    14        INIT_METHOD_CALL                                         !1, 'call'
         15        NEW                                              $12     'DummyClass'
         16        DO_FCALL                                      0          
         17        SEND_VAR_NO_REF_EX                                       $12
         18        DO_FCALL                                      0  $14     
         19        ECHO                                                     $14
         20      > 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/YKtPC
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_THIS                                       $0      
          1        FETCH_OBJ_R                                      ~1      $0, 'value'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YKtPC
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_THIS                                       $0      
          1        FETCH_OBJ_R                                      ~1      $0, 'value'
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of Dynamic Function 1

Class DummyClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.27 ms | 1449 KiB | 13 Q