3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(){ $res[0] = "1.12"; $res[1] = ">"; $res[2] = "1"; switch($res[1]) { case ">": return ($res[0] > $res[2]); break; } } var_dump(test());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rVZWH
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'test'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rVZWH
function name:  test
number of ops:  18
compiled vars:  !0 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN_DIM                                               !0, 0
          1        OP_DATA                                                  '1.12'
    5     2        ASSIGN_DIM                                               !0, 1
          3        OP_DATA                                                  '%3E'
    6     4        ASSIGN_DIM                                               !0, 2
          5        OP_DATA                                                  '1'
    8     6        FETCH_DIM_R                                      ~4      !0, 1
    9     7        CASE                                                     ~4, '%3E'
          8      > JMPNZ                                                    ~5, ->10
          9    > > JMP                                                      ->16
   10    10    >   FETCH_DIM_R                                      ~6      !0, 0
         11        FETCH_DIM_R                                      ~7      !0, 2
         12        IS_SMALLER                                       ~8      ~7, ~6
         13        FREE                                                     ~4
         14      > RETURN                                                   ~8
   11    15*       JMP                                                      ->16
         16    >   FREE                                                     ~4
   13    17      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.21 ms | 1398 KiB | 16 Q