3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { protected $counter; public function __construct() { $counter = 0; for($i=0;$i<100000;$i++) { $this->counter++; } } public function __toString() { return $this->counter; } } $ct = new test(); echo $ct; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BMIN2
function name:  (null)
number of ops:  6
compiled vars:  !0 = $ct
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'test'
   24     1        NEW                                              $1      'test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   25     4        ECHO                                                     !0
   27     5      > RETURN                                                   1

Class test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
Branch analysis from position: 3
filename:       /in/BMIN2
function name:  __construct
number of ops:  8
compiled vars:  !0 = $counter, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 0
   10     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->5
   12     3    >   PRE_INC_OBJ                                              'counter'
   10     4        PRE_INC                                                  !1
          5    >   IS_SMALLER                                               !1, 100000
          6      > JMPNZ                                                    ~6, ->3
   14     7    > > RETURN                                                   null

End of function __construct

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BMIN2
function name:  __toString
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   FETCH_OBJ_R                                      ~0      'counter'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   20     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function __tostring

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.99 ms | 1395 KiB | 13 Q