3v4l.org

run code in 300+ PHP versions simultaneously
<?php $PXName = explode('.php', 'rptOwnerOverview2.php?Action=New')[0]; if (substr($PXName, -1) == '2' || substr($PXName, -1) == '3') { $PXName = substr($PXName, 0, -1); } echo $PXName;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 18
filename:       /in/AOiYt
function name:  (null)
number of ops:  27
compiled vars:  !0 = $PXName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '.php'
          2        SEND_VAL                                                 'rptOwnerOverview2.php%3FAction%3DNew'
          3        DO_ICALL                                         $1      
          4        FETCH_DIM_R                                      ~2      $1, 0
          5        ASSIGN                                                   !0, ~2
    4     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 -1
          9        DO_ICALL                                         $4      
         10        IS_EQUAL                                         ~5      $4, '2'
         11      > JMPNZ_EX                                         ~5      ~5, ->18
         12    >   INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 -1
         15        DO_ICALL                                         $6      
         16        IS_EQUAL                                         ~7      $6, '3'
         17        BOOL                                             ~5      ~7
         18    > > JMPZ                                                     ~5, ->25
    5    19    >   INIT_FCALL                                               'substr'
         20        SEND_VAR                                                 !0
         21        SEND_VAL                                                 0
         22        SEND_VAL                                                 -1
         23        DO_ICALL                                         $8      
         24        ASSIGN                                                   !0, $8
    7    25    >   ECHO                                                     !0
    8    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.83 ms | 1399 KiB | 17 Q