3v4l.org

run code in 300+ PHP versions simultaneously
<?php $derp = ",test, derp, hurp,"; $arr1 = explode(',',str_replace(array(' ,',', ',' , '),array(',',',',','),$derp)); $arr = explode(',',$derp); $arr = array_map('trim', $arr); print_R($arr);print_R($arr1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SmCVF
function name:  (null)
number of ops:  28
compiled vars:  !0 = $derp, !1 = $arr1, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Ctest%2C+derp%2C+hurp%2C'
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        INIT_FCALL                                               'str_replace'
          4        SEND_VAL                                                 <array>
          5        SEND_VAL                                                 <array>
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !1, $5
    4    11        INIT_FCALL                                               'explode'
         12        SEND_VAL                                                 '%2C'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !2, $7
    5    16        INIT_FCALL                                               'array_map'
         17        SEND_VAL                                                 'trim'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                         $9      
         20        ASSIGN                                                   !2, $9
    7    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
         24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.43 ms | 1395 KiB | 21 Q