3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variable_name = 'field_bundle_settings_my_type__my_field__name'; $name = str_replace('field_bundle_settings_', '', $row->name); $entity_type = substr($name, 0, strpos($name, '__')); $bundle = substr($name, strpos($name, '__') + 2); print $entity_type . "\n"; print $bundle;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wiorv
function name:  (null)
number of ops:  32
compiled vars:  !0 = $variable_name, !1 = $name, !2 = $row, !3 = $entity_type, !4 = $bundle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'field_bundle_settings_my_type__my_field__name'
    4     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 'field_bundle_settings_'
          3        SEND_VAL                                                 ''
          4        FETCH_OBJ_R                                      ~6      !2, 'name'
          5        SEND_VAL                                                 ~6
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !1, $7
    5     8        INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 0
         11        INIT_FCALL                                               'strpos'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 '__'
         14        DO_ICALL                                         $9      
         15        SEND_VAR                                                 $9
         16        DO_ICALL                                         $10     
         17        ASSIGN                                                   !3, $10
    6    18        INIT_FCALL                                               'substr'
         19        SEND_VAR                                                 !1
         20        INIT_FCALL                                               'strpos'
         21        SEND_VAR                                                 !1
         22        SEND_VAL                                                 '__'
         23        DO_ICALL                                         $12     
         24        ADD                                              ~13     $12, 2
         25        SEND_VAL                                                 ~13
         26        DO_ICALL                                         $14     
         27        ASSIGN                                                   !4, $14
    7    28        CONCAT                                           ~16     !3, '%0A'
         29        ECHO                                                     ~16
    8    30        ECHO                                                     !4
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.91 ms | 1396 KiB | 19 Q