3v4l.org

run code in 300+ PHP versions simultaneously
<?php $proper_urls = array('.com', '.pl', '.co.uk', '.com.pl', '.org'); $website = 'fdsfsdf.pl'; $web = explode('.', $website); echo end($web); if(in_array(".{end($web)}", $proper_urls)) { echo 'valid'; } else { echo 'not valid'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gFSAX
function name:  (null)
number of ops:  23
compiled vars:  !0 = $proper_urls, !1 = $website, !2 = $web
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 'fdsfsdf.pl'
    5     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '.'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    7     7        INIT_FCALL                                               'end'
          8        SEND_REF                                                 !2
          9        DO_ICALL                                         $7      
         10        ECHO                                                     $7
    9    11        INIT_FCALL                                               'in_array'
         12        ROPE_INIT                                     3  ~9      '.%7Bend%28'
         13        ROPE_ADD                                      1  ~9      ~9, !2
         14        ROPE_END                                      2  ~8      ~9, '%29%7D'
         15        SEND_VAL                                                 ~8
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $11     
         18      > JMPZ                                                     $11, ->21
   11    19    >   ECHO                                                     'valid'
         20      > JMP                                                      ->22
   15    21    >   ECHO                                                     'not+valid'
   16    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.83 ms | 1395 KiB | 19 Q