3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { public function __construct() { $x =& $this; $x = new stdClass; var_dump($this); } } for($i=1; $i<10000;$i++) { var_dump(new x); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 2
Branch analysis from position: 10
Branch analysis from position: 2
filename:       /in/BeMqv
function name:  (null)
number of ops:  11
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, 1
          1      > JMP                                                      ->8
   13     2    >   INIT_FCALL                                               'var_dump'
          3        NEW                                              $2      'x'
          4        DO_FCALL                                      0          
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
   12     7        PRE_INC                                                  !0
          8    >   IS_SMALLER                                               !0, 10000
          9      > JMPNZ                                                    ~6, ->2
   14    10    > > RETURN                                                   1

Class x:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BeMqv
function name:  __construct
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_THIS                                       $1      
          1        ASSIGN_REF                                               !0, $1
    8     2        NEW                                              $3      'stdClass'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
    9     5        INIT_FCALL                                               'var_dump'
          6        FETCH_THIS                                       ~6      
          7        SEND_VAL                                                 ~6
          8        DO_ICALL                                                 
   10     9      > RETURN                                                   null

End of function __construct

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.64 ms | 1395 KiB | 15 Q