3v4l.org

run code in 300+ PHP versions simultaneously
<?php $temp_terms = $params_arr["pm_other_terms"]; $temp_terms = "jd, jack, jack, jb, jd"; $temp_terms_arr = explode(",", $temp_terms); pr($temp_terms_arr); array_walk($temp_terms_arr, "trimspace"); echo 123; pr($temp_terms_arr); $u_arr = array_unique($temp_terms_arr); pr($u_arr); $f_arr = array_filter($u_arr); pr($f_arr); $pm_other_terms = implode(", ", $f_arr); echo $pm_other_terms; function trimspace(&$var){ $var = trim($var); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/stnNd
function name:  (null)
number of ops:  40
compiled vars:  !0 = $temp_terms, !1 = $params_arr, !2 = $temp_terms_arr, !3 = $u_arr, !4 = $f_arr, !5 = $pm_other_terms
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_DIM_R                                      ~6      !1, 'pm_other_terms'
          1        ASSIGN                                                   !0, ~6
    4     2        ASSIGN                                                   !0, 'jd%2C+++++jack%2C+++jack%2C+++jb%2C+++++++jd'
    5     3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%2C'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $9      
          7        ASSIGN                                                   !2, $9
    6     8        INIT_FCALL_BY_NAME                                       'pr'
          9        SEND_VAR_EX                                              !2
         10        DO_FCALL                                      0          
    7    11        INIT_FCALL                                               'array_walk'
         12        SEND_REF                                                 !2
         13        SEND_VAL                                                 'trimspace'
         14        DO_ICALL                                                 
    8    15        ECHO                                                     123
    9    16        INIT_FCALL_BY_NAME                                       'pr'
         17        SEND_VAR_EX                                              !2
         18        DO_FCALL                                      0          
   10    19        INIT_FCALL                                               'array_unique'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $14     
         22        ASSIGN                                                   !3, $14
   11    23        INIT_FCALL_BY_NAME                                       'pr'
         24        SEND_VAR_EX                                              !3
         25        DO_FCALL                                      0          
   12    26        INIT_FCALL                                               'array_filter'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                         $17     
         29        ASSIGN                                                   !4, $17
   13    30        INIT_FCALL_BY_NAME                                       'pr'
         31        SEND_VAR_EX                                              !4
         32        DO_FCALL                                      0          
   14    33        INIT_FCALL                                               'implode'
         34        SEND_VAL                                                 '%2C+'
         35        SEND_VAR                                                 !4
         36        DO_ICALL                                         $20     
         37        ASSIGN                                                   !5, $20
   15    38        ECHO                                                     !5
   19    39      > RETURN                                                   1

Function trimspace:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/stnNd
function name:  trimspace
number of ops:  6
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        INIT_FCALL                                               'trim'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
   19     5      > RETURN                                                   null

End of function trimspace

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.32 ms | 1400 KiB | 25 Q