3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ public function asdf(){ foreach( array( 1, 2, 3, 4, 5 ) as $k ){ if( ($k === 3 ) ){ $a = 'asdf'; } } return $a; } } $t = new Test(); var_dump( $t->asdf() );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GJ0rA
function name:  (null)
number of ops:  9
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'asdf'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class Test:
Function asdf:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 6
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 5
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/GJ0rA
function name:  asdf
number of ops:  9
compiled vars:  !0 = $k, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > FE_RESET_R                                       $2      <array>, ->6
          1    > > FE_FETCH_R                                               $2, !0, ->6
    7     2    >   IS_IDENTICAL                                             !0, 3
          3      > JMPZ                                                     ~3, ->5
    8     4    >   ASSIGN                                                   !1, 'asdf'
    6     5    > > JMP                                                      ->1
          6    >   FE_FREE                                                  $2
   11     7      > RETURN                                                   !1
   12     8*     > RETURN                                                   null

End of function asdf

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.58 ms | 1395 KiB | 15 Q