3v4l.org

run code in 300+ PHP versions simultaneously
<?php $domains = array( 'http://wwwvagrant.royalmail.com/business', 'http://wwwvagrant.parcelforce.com', 'https://www2.postoffice.co.uk', 'http://wwwvagrant.royalmail.com', 'asdfasdfasdf', 'http://eibvagrant.royalmail.com', 'http://wwwvagrant.royalmail.com/payments', ); $doamins = array_filter($domains, function($domain) { return filter_var($domain, FILTER_VALIDATE_URL) !== FALSE; }); print_r($domains); var_dump( filter_var('dsd', FILTER_VALIDATE_UR));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0SSvI
function name:  (null)
number of ops:  19
compiled vars:  !0 = $domains, !1 = $doamins
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F0SSvI%3A11%240'
          4        SEND_VAL                                                 ~3
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
   13     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   14    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'filter_var'
         12        SEND_VAL                                                 'dsd'
         13        FETCH_CONSTANT                                   ~7      'FILTER_VALIDATE_UR'
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                         $8      
         16        SEND_VAR                                                 $8
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F0SSvI%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0SSvI
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $domain
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'filter_var'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 273
          4        DO_ICALL                                         $1      
          5        TYPE_CHECK                                  1018  ~2      $1
          6      > RETURN                                                   ~2
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F0SSvI%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.5 ms | 1396 KiB | 21 Q