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'; print_r(array_map(function ($domain) { preg_match('#(https?:\/\/)?(www\.)?([^\/]+)#', $domain, $matches); return $matches[3] ?? null; }, $domains));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2epae
function name:  (null)
number of ops:  17
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'
    8     8        INIT_FCALL                                               'print_r'
          9        INIT_FCALL                                               'array_map'
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F2epae%3A8%240'
   11    11        SEND_VAL                                                 ~5
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2F2epae%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.5 ms | 1396 KiB | 19 Q