3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<'HERE' $State ='Kentucky'; echo $State; switch($State) { case 'Kentucky': $StateAbbreviation = 'KY'; break;}echo $StateAbbreviation ; HERE; foreach (str_split($str) as $char) { printf("%02X => %s\n", ord($char), $char); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 15
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/i9fHP
function name:  (null)
number of ops:  17
compiled vars:  !0 = $str, !1 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%24State+%3D%27Kentucky%27%3B%C2%A0echo+%24State%3B%C2%A0switch%28%24State%29+%7B%C2%A0case+%27Kentucky%27%3A%C2%A0%24StateAbbreviation+%3D+%27KY%27%3B%C2%A0break%3B%7Decho+%24StateAbbreviation+%3B'
    7     1        INIT_FCALL                                               'str_split'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4      > FE_RESET_R                                       $4      $3, ->15
          5    > > FE_FETCH_R                                               $4, !1, ->15
    8     6    >   INIT_FCALL                                               'printf'
          7        SEND_VAL                                                 '%2502X+%3D%3E+%25s%0A'
          8        INIT_FCALL                                               'ord'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $5      
         11        SEND_VAR                                                 $5
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
    7    14      > JMP                                                      ->5
         15    >   FE_FREE                                                  $4
    9    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.65 ms | 1395 KiB | 19 Q