3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $x = 3; } $foo = new Foo; $foobar = function ($y) { var_dump($this->x + $y); }; $foobar->call($foo, 2); // int(5)
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MM6g0
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foo, !1 = $foobar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    5     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FMM6g0%3A5%240'
          4        ASSIGN                                                   !1, ~5
    9     5        INIT_METHOD_CALL                                         !1, 'call'
          6        SEND_VAR_EX                                              !0
          7        SEND_VAL_EX                                              2
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FMM6g0%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MM6g0
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'var_dump'
          2        FETCH_THIS                                       $1      
          3        FETCH_OBJ_R                                      ~2      $1, 'x'
          4        ADD                                              ~3      ~2, !0
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                                 
    7     7      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FMM6g0%3A5%240

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.54 ms | 1399 KiB | 15 Q