3v4l.org

run code in 300+ PHP versions simultaneously
<?php $field = 'aut.date AS "date_inscription"'; if(strpos($field, 'aut.') === 0) { $_field = explode('.', $field); $aliasSuffix = $_field[1]; if(strpos($field, 'AS')!=-1) { $_aliasSuffix = explode('AS', $_field[1]); $aliasSuffix = str_replace(array('"', "'"), '', trim($_aliasSuffix[1])); } } echo "aliasSuffix=$aliasSuffix";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 36
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 36
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
Branch analysis from position: 36
filename:       /in/V98us
function name:  (null)
number of ops:  40
compiled vars:  !0 = $field, !1 = $_field, !2 = $aliasSuffix, !3 = $_aliasSuffix
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'aut.date+AS+%22date_inscription%22'
    3     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 'aut.'
          4        DO_ICALL                                         $5      
          5        IS_IDENTICAL                                             $5, 0
          6      > JMPZ                                                     ~6, ->36
    4     7    >   INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '.'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !1, $7
    5    12        FETCH_DIM_R                                      ~9      !1, 1
         13        ASSIGN                                                   !2, ~9
    6    14        INIT_FCALL                                               'strpos'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 'AS'
         17        DO_ICALL                                         $11     
         18        IS_NOT_EQUAL                                             $11, -1
         19      > JMPZ                                                     ~12, ->36
    7    20    >   INIT_FCALL                                               'explode'
         21        SEND_VAL                                                 'AS'
         22        FETCH_DIM_R                                      ~13     !1, 1
         23        SEND_VAL                                                 ~13
         24        DO_ICALL                                         $14     
         25        ASSIGN                                                   !3, $14
    8    26        INIT_FCALL                                               'str_replace'
         27        SEND_VAL                                                 <array>
         28        SEND_VAL                                                 ''
         29        INIT_FCALL                                               'trim'
         30        FETCH_DIM_R                                      ~16     !3, 1
         31        SEND_VAL                                                 ~16
         32        DO_ICALL                                         $17     
         33        SEND_VAR                                                 $17
         34        DO_ICALL                                         $18     
         35        ASSIGN                                                   !2, $18
   12    36    >   NOP                                                      
         37        FAST_CONCAT                                      ~20     'aliasSuffix%3D', !2
         38        ECHO                                                     ~20
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.85 ms | 1388 KiB | 21 Q