3v4l.org

run code in 500+ PHP versions simultaneously
<?php function doFoo($i): void { switch ($i) { case 1: var_dump(__LINE__); break; case 2: var_dump(__LINE__); break; case "1": var_dump(__LINE__); break; } } doFoo("1");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RVlEU
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                                   'dofoo'
          1        SEND_VAL                                                     '1'
          2        DO_FCALL                                          0          
          3      > RETURN                                                       1

Function dofoo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
filename:       /in/RVlEU
function name:  doFoo
number of ops:  21
compiled vars:  !0 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    6     1        IS_EQUAL                                                     !0, 1
          2      > JMPNZ                                                        ~1, ->8
    9     3    >   IS_EQUAL                                                     !0, 2
          4      > JMPNZ                                                        ~1, ->12
   12     5    >   IS_EQUAL                                                     !0, '1'
          6      > JMPNZ                                                        ~1, ->16
          7    > > JMP                                                          ->20
    7     8    >   INIT_FCALL                                                   'var_dump'
          9        SEND_VAL                                                     7
         10        DO_ICALL                                                     
    8    11      > JMP                                                          ->20
   10    12    >   INIT_FCALL                                                   'var_dump'
         13        SEND_VAL                                                     10
         14        DO_ICALL                                                     
   11    15      > JMP                                                          ->20
   13    16    >   INIT_FCALL                                                   'var_dump'
         17        SEND_VAL                                                     13
         18        DO_ICALL                                                     
   14    19      > JMP                                                          ->20
   16    20    > > RETURN                                                       null

End of function dofoo

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.56 ms | 3375 KiB | 15 Q