3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "/1asdfsafsadf/2asdfvzxcgdtgh/3/"; $paramArr = explode("/",$string); $first = array_key_exists(0,$paramArr) ? $paramArr[0] : 'leeg'; echo $first;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vJnbf
function name:  (null)
number of ops:  15
compiled vars:  !0 = $string, !1 = $paramArr, !2 = $first
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F1asdfsafsadf%2F2asdfvzxcgdtgh%2F3%2F'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    6     6        ARRAY_KEY_EXISTS                                         0, !1
          7      > JMPZ                                                     ~6, ->11
          8    >   FETCH_DIM_R                                      ~7      !1, 0
          9        QM_ASSIGN                                        ~8      ~7
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~8      'leeg'
         12    >   ASSIGN                                                   !2, ~8
    7    13        ECHO                                                     !2
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.4 ms | 1394 KiB | 15 Q