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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.05 ms | 1395 KiB | 17 Q