3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar = '1'; } $foo = new Foo(); $f = function () { return $this->bar; }; for ($i = 100; $i < 101; $i++) { echo $f->call($foo); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/nH57k
function name:  (null)
number of ops:  15
compiled vars:  !0 = $foo, !1 = $f, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   10     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FnH57k%3A10%240'
          4        ASSIGN                                                   !1, ~6
   14     5        ASSIGN                                                   !2, 100
          6      > JMP                                                      ->12
   15     7    >   INIT_METHOD_CALL                                         !1, 'call'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $9      
         10        ECHO                                                     $9
   14    11        PRE_INC                                                  !2
         12    >   IS_SMALLER                                               !2, 101
         13      > JMPNZ                                                    ~11, ->7
   16    14    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FnH57k%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nH57k
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, 'bar'
          2      > RETURN                                                   ~1
   12     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FnH57k%3A10%240

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.59 ms | 1394 KiB | 13 Q