3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hash =[ 'code' => 'valeur', 'foo_fury' => 'bar', 'foo_bar_baz' => 'FOOOOO' ]; $shipping_method = 'foo_bar_baz_pong'; foreach ($hash as $code => $label){ if(substr($shipping_method,0, strlen($code)) == $code){ $carrier_code = $code; break; } var_dump($code); } var_dump($carrier_code);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 19
Branch analysis from position: 19
filename:       /in/iOqti
function name:  (null)
number of ops:  24
compiled vars:  !0 = $hash, !1 = $shipping_method, !2 = $label, !3 = $code, !4 = $carrier_code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 'foo_bar_baz_pong'
   11     2      > FE_RESET_R                                       $7      !0, ->19
          3    > > FE_FETCH_R                                       ~8      $7, !2, ->19
          4    >   ASSIGN                                                   !3, ~8
   12     5        INIT_FCALL                                               'substr'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 0
          8        STRLEN                                           ~10     !3
          9        SEND_VAL                                                 ~10
         10        DO_ICALL                                         $11     
         11        IS_EQUAL                                                 !3, $11
         12      > JMPZ                                                     ~12, ->15
   13    13    >   ASSIGN                                                   !4, !3
   14    14      > JMP                                                      ->19
   16    15    >   INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
   11    18      > JMP                                                      ->3
         19    >   FE_FREE                                                  $7
   18    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !4
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.2 ms | 1395 KiB | 17 Q