3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($i=0;$i<10;$i++) { $c = new class { function foo() { var_dump(__CLASS__); } }; $c->foo(); var_dump($c); }
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 = 2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 2
Branch analysis from position: 14
Branch analysis from position: 2
filename:       /in/cCUlM
function name:  (null)
number of ops:  15
compiled vars:  !0 = $i, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->12
    4     2    >   DECLARE_ANON_CLASS                               <unknown> 
          3        NEW                                              $4      $3
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $4
    7     6        INIT_METHOD_CALL                                         !1, 'foo'
          7        DO_FCALL                                      0          
    8     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
    3    11        PRE_INC                                                  !0
         12    >   IS_SMALLER                                               !0, 10
         13      > JMPNZ                                                    ~10, ->2
    9    14    > > RETURN                                                   1

Class class@anonymous:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cCUlM
function name:  foo
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'class%40anonymous%00%2Fin%2FcCUlM%3A4%240'
          2        DO_ICALL                                                 
          3      > RETURN                                                   null

End of function foo

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.66 ms | 1395 KiB | 15 Q