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] : '';
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/AJPfB
function name:  (null)
number of ops:  14
compiled vars:  !0 = $string, !1 = $paramArr, !2 = $first
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2F1asdfsafsadf%2F2asdfvzxcgdtgh%2F3%2F'
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     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      ''
         12    >   ASSIGN                                                   !2, ~8
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.74 ms | 1394 KiB | 15 Q