3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($str){ if(strpos(str, ">") !== false) { $exp = explode(">", $str); return ($exp[0] > $exp[1]); } } var_dump(test("1.2 > 2"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6IqFO
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'test'
          2        SEND_VAL                                                 '1.2+%3E+2'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6IqFO
function name:  test
number of ops:  18
compiled vars:  !0 = $str, !1 = $exp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'strpos'
          2        FETCH_CONSTANT                                   ~2      'str'
          3        SEND_VAL                                                 ~2
          4        SEND_VAL                                                 '%3E'
          5        DO_ICALL                                         $3      
          6        TYPE_CHECK                                  1018          $3
          7      > JMPZ                                                     ~4, ->17
    7     8    >   INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%3E'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        ASSIGN                                                   !1, $5
    8    13        FETCH_DIM_R                                      ~7      !1, 0
         14        FETCH_DIM_R                                      ~8      !1, 1
         15        IS_SMALLER                                       ~9      ~8, ~7
         16      > RETURN                                                   ~9
   10    17    > > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.24 ms | 1398 KiB | 20 Q