3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($input) { $foo = range ('A', 'D'); if ($input >= 0.6 && $input <= 1) { var_dump($foo[(0.999 - $input)*10]); } else { var_dump('F'); } } test(0.7); test(1); test(0.6); test(0.5); test(2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wnu52
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'test'
          1        SEND_VAL                                                 0.7
          2        DO_FCALL                                      0          
   14     3        INIT_FCALL                                               'test'
          4        SEND_VAL                                                 1
          5        DO_FCALL                                      0          
   15     6        INIT_FCALL                                               'test'
          7        SEND_VAL                                                 0.6
          8        DO_FCALL                                      0          
   16     9        INIT_FCALL                                               'test'
         10        SEND_VAL                                                 0.5
         11        DO_FCALL                                      0          
   17    12        INIT_FCALL                                               'test'
         13        SEND_VAL                                                 2
         14        DO_FCALL                                      0          
         15      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/Wnu52
function name:  test
number of ops:  22
compiled vars:  !0 = $input, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 'A'
          3        SEND_VAL                                                 'D'
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !1, $2
    5     6        IS_SMALLER_OR_EQUAL                              ~4      0.6, !0
          7      > JMPZ_EX                                          ~4      ~4, ->10
          8    >   IS_SMALLER_OR_EQUAL                              ~5      !0, 1
          9        BOOL                                             ~4      ~5
         10    > > JMPZ                                                     ~4, ->18
    7    11    >   INIT_FCALL                                               'var_dump'
         12        SUB                                              ~6      0.999, !0
         13        MUL                                              ~7      ~6, 10
         14        FETCH_DIM_R                                      ~8      !1, ~7
         15        SEND_VAL                                                 ~8
         16        DO_ICALL                                                 
         17      > JMP                                                      ->21
    9    18    >   INIT_FCALL                                               'var_dump'
         19        SEND_VAL                                                 'F'
         20        DO_ICALL                                                 
   11    21    > > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.72 ms | 1403 KiB | 22 Q