3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urlPath = parse_url('http://tvil.ru/city/gelendzhik/hotels/341229/', PHP_URL_PATH); $pathParts = explode('/', $urlPath); $pathParts = array_filter($old_array, function($element) { return !empty($element); }); var_dump($pathParts);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l2h88
function name:  (null)
number of ops:  20
compiled vars:  !0 = $urlPath, !1 = $pathParts, !2 = $old_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'parse_url'
          1        SEND_VAL                                                 'http%3A%2F%2Ftvil.ru%2Fcity%2Fgelendzhik%2Fhotels%2F341229%2F'
          2        SEND_VAL                                                 5
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    4     5        INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '%2F'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
    5    10        INIT_FCALL                                               'array_filter'
         11        SEND_VAR                                                 !2
         12        DECLARE_LAMBDA_FUNCTION                          ~7      [0]
    7    13        SEND_VAL                                                 ~7
    5    14        DO_ICALL                                         $8      
         15        ASSIGN                                                   !1, $8
    9    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
         19      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l2h88
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > RETURN                                                   ~2
    7     4*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.82 ms | 1429 KiB | 17 Q