3v4l.org

run code in 300+ PHP versions simultaneously
<?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:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'inspect'
          2        NEW                                              $0      'Foo'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $0
          5        SEND_VAL                                                 'bar'
          6        DO_FCALL                                      0  $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

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%2FlqZBd%3A4%240'
          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

Function %00%7Bclosure%7D%2Fin%2FlqZBd%3A4%240:
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:  5
compiled vars:  !0 = $property
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_STATIC                                              !0
    5     1        FETCH_THIS                                       $1      
          2        FETCH_OBJ_R                                      ~2      $1, !0
          3      > RETURN                                                   ~2
    6     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FlqZBd%3A4%240

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.88 ms | 1399 KiB | 16 Q