3v4l.org

run code in 300+ PHP versions simultaneously
<?php function someSearch($param) { if ($param === 2) return 123; } $result = null; switch (true) { case $result = someSearch(1) or $result !== null: break; case $result = someSearch(2) or $result !== null: break; case $result = someSearch(3) or $result !== null: break; default: $result = someSearch(4); } echo $result;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 26
Branch analysis from position: 9
2 jumps found. (Code = 47) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 27
Branch analysis from position: 17
2 jumps found. (Code = 47) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 28
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 24
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 16
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 8
filename:       /in/2hqMK
function name:  (null)
number of ops:  35
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, null
    8     1        INIT_FCALL                                               'somesearch'
          2        SEND_VAL                                                 1
          3        DO_FCALL                                      0  $3      
          4        ASSIGN                                           ~4      !0, $3
          5      > JMPNZ_EX                                         ~4      ~4, ->8
    7     6    >   TYPE_CHECK                                  1020  ~5      !0
          7        BOOL                                             ~4      ~5
          8    > > JMPNZ                                                    ~4, ->26
   10     9    >   INIT_FCALL                                               'somesearch'
         10        SEND_VAL                                                 2
         11        DO_FCALL                                      0  $6      
         12        ASSIGN                                           ~7      !0, $6
         13      > JMPNZ_EX                                         ~7      ~7, ->16
         14    >   TYPE_CHECK                                  1020  ~8      !0
         15        BOOL                                             ~7      ~8
         16    > > JMPNZ                                                    ~7, ->27
   12    17    >   INIT_FCALL                                               'somesearch'
         18        SEND_VAL                                                 3
         19        DO_FCALL                                      0  $9      
         20        ASSIGN                                           ~10     !0, $9
         21      > JMPNZ_EX                                         ~10     ~10, ->24
         22    >   TYPE_CHECK                                  1020  ~11     !0
         23        BOOL                                             ~10     ~11
         24    > > JMPNZ                                                    ~10, ->28
         25    > > JMP                                                      ->29
    9    26    > > JMP                                                      ->33
   11    27    > > JMP                                                      ->33
   13    28    > > JMP                                                      ->33
   15    29    >   INIT_FCALL                                               'somesearch'
         30        SEND_VAL                                                 4
         31        DO_FCALL                                      0  $12     
         32        ASSIGN                                                   !0, $12
   18    33    >   ECHO                                                     !0
         34      > RETURN                                                   1

Function somesearch:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2hqMK
function name:  someSearch
number of ops:  5
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        IS_IDENTICAL                                             !0, 2
          2      > JMPZ                                                     ~1, ->4
          3    > > RETURN                                                   123
          4    > > RETURN                                                   null

End of function somesearch

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.6 ms | 1403 KiB | 17 Q