3v4l.org

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

Class A:
Function addx:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5GHc2
function name:  addX
number of ops:  5
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        FETCH_OBJ_W                                      $1      'x'
          2        ASSIGN_DIM                                               $1, !0
          3        OP_DATA                                                  !0
    8     4      > RETURN                                                   null

End of function addx

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.77 ms | 1394 KiB | 13 Q