3v4l.org

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

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

End of function get_type

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.97 ms | 1397 KiB | 14 Q