3v4l.org

run code in 200+ php & hhvm versions
<?php function inspect($object, $property) { return (function () use ($property) { return $this->$property; })->call($object); } class Foo { private $bar = "hands off!"; } var_dump(inspect(new Foo(), "bar"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lqZBd
function name:  (null)
number of ops:  12
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
   9     1        NOP                                                      
  13     2        INIT_FCALL                                               'var_dump'
         3        INIT_FCALL                                               'inspect'
         4        NEW                                              $1      :13
         5        DO_FCALL                                      0          
         6        SEND_VAR                                                 $1
         7        SEND_VAL                                                 'bar'
         8        DO_FCALL                                      0  $3      
         9        SEND_VAR                                                 $3
        10        DO_ICALL                                                 
        11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FlqZBd0x7ffbab5ea07d:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lqZBd
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $property
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   BIND_STATIC                                              !0, 'property'
   5     1        FETCH_OBJ_R                                      ~1      !0
         2      > RETURN                                                   ~1
   6     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FlqZBd0x7ffbab5ea07d

Function inspect:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lqZBd
function name:  inspect
number of ops:  9
compiled vars:  !0 = $object, !1 = $property
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   RECV                                             !0      
         1        RECV                                             !1      
   4     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FlqZBd0x7ffbab5ea07d'
         3        BIND_LEXICAL                                             ~2, !1
   6     4        INIT_METHOD_CALL                                         ~2, 'call'
         5        SEND_VAR_EX                                              !0
         6        DO_FCALL                                      0  $3      
         7      > RETURN                                                   $3
   7     8*     > RETURN                                                   null

End of function inspect

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 7.3.0