3v4l.org

run code in 300+ PHP versions simultaneously
<?php $category = "112:Category Six:events"; $category_data = explode(':', $category); if (strpos($category_data[0], '-') !== false) { $productId = explode('-', $category_data[0]); var_dump($productId[0]); var_dump($productId[1]); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 27
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/WdfU6
function name:  (null)
number of ops:  28
compiled vars:  !0 = $category, !1 = $category_data, !2 = $productId
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '112%3ACategory+Six%3Aevents'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%3A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    7     6        INIT_FCALL                                               'strpos'
          7        FETCH_DIM_R                                      ~6      !1, 0
          8        SEND_VAL                                                 ~6
          9        SEND_VAL                                                 '-'
         10        DO_ICALL                                         $7      
         11        TYPE_CHECK                                  1018          $7
         12      > JMPZ                                                     ~8, ->27
    8    13    >   INIT_FCALL                                               'explode'
         14        SEND_VAL                                                 '-'
         15        FETCH_DIM_R                                      ~9      !1, 0
         16        SEND_VAL                                                 ~9
         17        DO_ICALL                                         $10     
         18        ASSIGN                                                   !2, $10
    9    19        INIT_FCALL                                               'var_dump'
         20        FETCH_DIM_R                                      ~12     !2, 0
         21        SEND_VAL                                                 ~12
         22        DO_ICALL                                                 
   10    23        INIT_FCALL                                               'var_dump'
         24        FETCH_DIM_R                                      ~14     !2, 1
         25        SEND_VAL                                                 ~14
         26        DO_ICALL                                                 
   11    27    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
193.76 ms | 1395 KiB | 19 Q