3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string="M"; $strig=""; $strg=""; $stg=""; $last=array($strig,$strg,$string,$stg); echo Implode($last,""); switch($last) { case 'k': case 'K': echo "k"; break; case 'm': case 'M': echo "k"; break; default: echo "o"; } ?>
Finding entry points
Branch analysis from position: 0
6 jumps found. (Code = 188) Position 1 = 24, Position 2 = 24, Position 3 = 26, Position 4 = 26, Position 5 = 28, Position 6 = 15
Branch analysis from position: 24
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: 24
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 26
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 26
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 26
Branch analysis from position: 26
Branch analysis from position: 24
Branch analysis from position: 24
filename:       /in/uE6PS
function name:  (null)
number of ops:  30
compiled vars:  !0 = $string, !1 = $strig, !2 = $strg, !3 = $stg, !4 = $last
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'M'
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, ''
    5     3        ASSIGN                                                   !3, ''
    6     4        INIT_ARRAY                                       ~9      !1
          5        ADD_ARRAY_ELEMENT                                ~9      !2
          6        ADD_ARRAY_ELEMENT                                ~9      !0
          7        ADD_ARRAY_ELEMENT                                ~9      !3
          8        ASSIGN                                                   !4, ~9
    7     9        INIT_FCALL                                               'implode'
         10        SEND_VAR                                                 !4
         11        SEND_VAL                                                 ''
         12        DO_ICALL                                         $11     
         13        ECHO                                                     $11
    8    14      > SWITCH_STRING                                            !4, [ 'k':->24, 'K':->24, 'm':->26, 'M':->26, ], ->28
    9    15    >   IS_EQUAL                                                 !4, 'k'
         16      > JMPNZ                                                    ~12, ->24
   10    17    >   IS_EQUAL                                                 !4, 'K'
         18      > JMPNZ                                                    ~12, ->24
   13    19    >   IS_EQUAL                                                 !4, 'm'
         20      > JMPNZ                                                    ~12, ->26
   14    21    >   IS_EQUAL                                                 !4, 'M'
         22      > JMPNZ                                                    ~12, ->26
         23    > > JMP                                                      ->28
   11    24    >   ECHO                                                     'k'
   12    25      > JMP                                                      ->29
   15    26    >   ECHO                                                     'k'
   17    27      > JMP                                                      ->29
   19    28    >   ECHO                                                     'o'
   22    29    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.87 ms | 1396 KiB | 15 Q