3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val = " 1 , 2,3 "; $delimiter = ","; var_dump(explode($delimiter, $val)); var_dump(preg_split("/\s*$delimiter\s*/", $val));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rI8VD
function name:  (null)
number of ops:  20
compiled vars:  !0 = $val, !1 = $delimiter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '+1+%2C+2%2C3+'
    3     1        ASSIGN                                                   !1, '%2C'
    4     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'explode'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'preg_split'
         11        ROPE_INIT                                     3  ~7      '%2F%5Cs%2A'
         12        ROPE_ADD                                      1  ~7      ~7, !1
         13        ROPE_END                                      2  ~6      ~7, '%5Cs%2A%2F'
         14        SEND_VAL                                                 ~6
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $9      
         17        SEND_VAR                                                 $9
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.7 ms | 1399 KiB | 19 Q