3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testing_string = "OFFER_TYPE_1"; var_dump(strpos($field, 'OFFER_URL_ENG')); $array = explode("_", $testing_string); var_dump($array); $index = intval(end($array))-1; //array index start from 0, while for user readability index starts at 1 unset($array[key($array)]); echo implode("_", $array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XnOEc
function name:  (null)
number of ops:  32
compiled vars:  !0 = $testing_string, !1 = $field, !2 = $array, !3 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'OFFER_TYPE_1'
    4     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 'OFFER_URL_ENG'
          5        DO_ICALL                                         $5      
          6        SEND_VAR                                                 $5
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '_'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
    6    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
    7    16        INIT_FCALL                                               'end'
         17        SEND_REF                                                 !2
         18        DO_ICALL                                         $10     
         19        CAST                                          4  ~11     $10
         20        SUB                                              ~12     ~11, 1
         21        ASSIGN                                                   !3, ~12
    8    22        INIT_FCALL                                               'key'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                         $14     
         25        UNSET_DIM                                                !2, $14
    9    26        INIT_FCALL                                               'implode'
         27        SEND_VAL                                                 '_'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                         $15     
         30        ECHO                                                     $15
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.24 ms | 1395 KiB | 25 Q