3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A1 { var $s; protected function a () { $i =0 ; while (true) { $i++; if ($i > 10000) { break; } foreach ([['a' => 1],2, ['a' => 2]] as $p) { if ($p == 2) { continue; } if ($i %100 == 0) { $this->s .= str_repeat('0123456789', 1000000); } yield $p['a'] => 123; } } } public function b(){ $sum = 0; foreach ( $this->a() as $k => $v ) { $sum += $k + $v; } echo 'Done: ', $sum; }} (new A1)->b();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rpSIt
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $0      'A1'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'b'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class A1:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 3
Branch analysis from position: 26
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 24
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 24
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 21
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 21
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 3
Branch analysis from position: 26
Branch analysis from position: 3
Branch analysis from position: 24
filename:       /in/rpSIt
function name:  a
number of ops:  27
compiled vars:  !0 = $i, !1 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   GENERATOR_CREATE                                         
    5     1        ASSIGN                                                   !0, 0
    6     2      > JMP                                                      ->25
    7     3    >   PRE_INC                                                  !0
    8     4        IS_SMALLER                                               10000, !0
          5      > JMPZ                                                     ~4, ->7
          6    > > JMP                                                      ->26
    9     7    > > FE_RESET_R                                       $5      <array>, ->24
          8    > > FE_FETCH_R                                               $5, !1, ->24
   10     9    >   IS_EQUAL                                                 !1, 2
         10      > JMPZ                                                     ~6, ->12
   11    11    > > JMP                                                      ->8
   13    12    >   MOD                                              ~7      !0, 100
         13        IS_EQUAL                                                 ~7, 0
         14      > JMPZ                                                     ~8, ->21
   14    15    >   INIT_FCALL                                               'str_repeat'
         16        SEND_VAL                                                 '0123456789'
         17        SEND_VAL                                                 1000000
         18        DO_ICALL                                         $10     
         19        ASSIGN_OBJ_OP                                 8          's'
         20        OP_DATA                                                  $10
   16    21    >   FETCH_DIM_R                                      ~11     !1, 'a'
         22        YIELD                                                    123, ~11
    9    23      > JMP                                                      ->8
         24    >   FE_FREE                                                  $5
    6    25    > > JMPNZ                                                    <true>, ->3
   19    26    > > GENERATOR_RETURN                                         

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/rpSIt
function name:  b
number of ops:  13
compiled vars:  !0 = $sum, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ASSIGN                                                   !0, 0
   22     1        INIT_METHOD_CALL                                         'a'
          2        DO_FCALL                                      0  $4      
          3      > FE_RESET_R                                       $5      $4, ->9
          4    > > FE_FETCH_R                                       ~6      $5, !1, ->9
          5    >   ASSIGN                                                   !2, ~6
   23     6        ADD                                              ~8      !2, !1
          7        ASSIGN_OP                                     1          !0, ~8
   22     8      > JMP                                                      ->4
          9    >   FE_FREE                                                  $5
   25    10        ECHO                                                     'Done%3A+'
         11        ECHO                                                     !0
   26    12      > RETURN                                                   null

End of function b

End of class A1.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.78 ms | 1400 KiB | 15 Q