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 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6qCvV
function name:  (null)
number of ops:  24
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        INIT_FCALL                                               'end'
         13        SEND_REF                                                 !2
         14        DO_ICALL                                         $8      
         15        CONCAT                                           ~9      '.', $8
         16        SEND_VAL                                                 ~9
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $10     
         19      > JMPZ                                                     $10, ->22
   11    20    >   ECHO                                                     'valid'
         21      > JMP                                                      ->23
   15    22    >   ECHO                                                     'not+valid'
   16    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.66 ms | 1395 KiB | 19 Q