3v4l.org

run code in 300+ PHP versions simultaneously
<?php $categoryText = 'TOYA > Kleště > Kleště spojovaci'; $categoryUrl = NULL; if (!empty($categoryText)) { $category = explode('>', $categoryText); $category = array_map(function ($val) { return trim($val); }, $category); $last = end($category); $categoryUrl = Strings::webalize(prev($category) . ' ' . $last); } var_dump ($categoryUrl);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 29
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/OZcXi
function name:  (null)
number of ops:  33
compiled vars:  !0 = $categoryText, !1 = $categoryUrl, !2 = $category, !3 = $last
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'TOYA+%3E+Kle%C5%A1t%C4%9B+%3E+Kle%C5%A1t%C4%9B+spojovaci'
    4     1        ASSIGN                                                   !1, null
    5     2        ISSET_ISEMPTY_CV                                 ~6      !0
          3        BOOL_NOT                                         ~7      ~6
          4      > JMPZ                                                     ~7, ->29
    6     5    >   INIT_FCALL                                               'explode'
          6        SEND_VAL                                                 '%3E'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $8      
          9        ASSIGN                                                   !2, $8
    7    10        INIT_FCALL                                               'array_map'
         11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FOZcXi%3A7%240'
    9    12        SEND_VAL                                                 ~10
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $11     
    7    15        ASSIGN                                                   !2, $11
   11    16        INIT_FCALL                                               'end'
         17        SEND_REF                                                 !2
         18        DO_ICALL                                         $13     
         19        ASSIGN                                                   !3, $13
   12    20        INIT_STATIC_METHOD_CALL                                  'Strings', 'webalize'
         21        INIT_FCALL                                               'prev'
         22        SEND_REF                                                 !2
         23        DO_ICALL                                         $15     
         24        CONCAT                                           ~16     $15, '+'
         25        CONCAT                                           ~17     ~16, !3
         26        SEND_VAL_EX                                              ~17
         27        DO_FCALL                                      0  $18     
         28        ASSIGN                                                   !1, $18
   14    29    >   INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FOZcXi%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.83 ms | 1400 KiB | 25 Q