3v4l.org

run code in 300+ PHP versions simultaneously
<?php $closureThatShowsTheProperty = function() { echo $this->prop; }; $objectThatHasTheProperty = new class() { public $prop = 123; }; $closureThatShowsTheProperty->bindTo($objectThatHasTheProperty)();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NEOpN
function name:  (null)
number of ops:  12
compiled vars:  !0 = $closureThatShowsTheProperty, !1 = $objectThatHasTheProperty
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          1        ASSIGN                                                   !0, ~2
    7     2        DECLARE_ANON_CLASS                               <const ast>   
          3        NEW                                              $5      $4
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   11     6        INIT_METHOD_CALL                                         !0, 'bindTo'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0  $8      
          9        INIT_DYNAMIC_CALL                                        $8
         10        DO_FCALL                                      0          
         11      > 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/NEOpN
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_THIS                                       $0      
          1        FETCH_OBJ_R                                      ~1      $0, 'prop'
          2        ECHO                                                     ~1
    5     3      > RETURN                                                   null

End of Dynamic Function 0

Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
263.44 ms | 996 KiB | 13 Q