3v4l.org

run code in 300+ PHP versions simultaneously
<?php $domains[] = 'www.wp.pl'; $domains[] = 'http://www.onet.pl/plp/costam'; $domains[] = 'onet.pl'; $domains[] = 'https://redtube.com/porn'; $domains[] = 'http://wwww.gżegżółka.www..w3schooåøls.coøm/pl/polska/index.php?id=op&pids=1'; $domains[] = 'http://wwww.gżegżółka.www.<script>alert(\'test\');</script>.w3schooåøls.coøm/pl/polska/index.php?id=op&pids=1'; print_r(array_map(function ($domain) { preg_match('#(https?:\/\/)?(www\.)?([a-z][^\/]+)#', $domain, $matches); return $matches[3]; }, $domains));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/67jid
function name:  (null)
number of ops:  21
compiled vars:  !0 = $domains
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0
          1        OP_DATA                                                  'www.wp.pl'
    4     2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  'http%3A%2F%2Fwww.onet.pl%2Fplp%2Fcostam'
    5     4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  'onet.pl'
    6     6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  'https%3A%2F%2Fredtube.com%2Fporn'
    7     8        ASSIGN_DIM                                               !0
          9        OP_DATA                                                  'http%3A%2F%2Fwwww.g%C5%BCeg%C5%BC%C3%B3%C5%82ka.www..w3schoo%C3%A5%C3%B8ls.co%C3%B8m%2Fpl%2Fpolska%2Findex.php%3Fid%3Dop%26pids%3D1'
    8    10        ASSIGN_DIM                                               !0
         11        OP_DATA                                                  'http%3A%2F%2Fwwww.g%C5%BCeg%C5%BC%C3%B3%C5%82ka.www.%3Cscript%3Ealert%28%27test%27%29%3B%3C%2Fscript%3E.w3schoo%C3%A5%C3%B8ls.co%C3%B8m%2Fpl%2Fpolska%2Findex.php%3Fid%3Dop%26pids%3D1'
   10    12        INIT_FCALL                                               'print_r'
         13        INIT_FCALL                                               'array_map'
         14        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F67jid%3A10%240'
   13    15        SEND_VAL                                                 ~7
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F67jid%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/67jid
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $domain, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%23%28https%3F%3A%5C%2F%5C%2F%29%3F%28www%5C.%29%3F%28%5Ba-z%5D%5B%5E%5C%2F%5D%2B%29%23'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
   12     6        FETCH_DIM_R                                      ~3      !1, 3
          7      > RETURN                                                   ~3
   13     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F67jid%3A10%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.59 ms | 1396 KiB | 19 Q