3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_type(){ $type_id = 2; return $type_id; } for ( $i=0; $i < 9999; $i++ ){ $bar = (int)get_type() === 2; } echo $bar;
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/HvTIB
function name:  (null)
number of ops:  12
compiled vars:  !0 = $i, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->8
    9     2    >   INIT_FCALL                                               'get_type'
          3        DO_FCALL                                      0  $3      
          4        CAST                                          4  ~4      $3
          5        IS_IDENTICAL                                     ~5      ~4, 2
          6        ASSIGN                                                   !1, ~5
    8     7        PRE_INC                                                  !0
          8    >   IS_SMALLER                                               !0, 9999
          9      > JMPNZ                                                    ~8, ->2
   11    10    >   ECHO                                                     !1
         11      > RETURN                                                   1

Function get_type:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HvTIB
function name:  get_type
number of ops:  3
compiled vars:  !0 = $type_id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 2
    5     1      > RETURN                                                   !0
    6     2*     > RETURN                                                   null

End of function get_type

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.89 ms | 1389 KiB | 14 Q