3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "Some text [many][more][other][tags][here] and maybe some text here?"; $split = explode(' ', strstr($input, '['), 2); var_export($split); echo "\n----------------\n"; $split[0] = preg_split('~]\K~', $split[0], -1, PREG_SPLIT_NO_EMPTY); var_export($split);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fbk0c
function name:  (null)
number of ops:  28
compiled vars:  !0 = $input, !1 = $split
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Some+text+%5Bmany%5D%5Bmore%5D%5Bother%5D%5Btags%5D%5Bhere%5D+and+maybe+some+text+here%3F'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        INIT_FCALL                                               'strstr'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 '%5B'
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        SEND_VAL                                                 2
          9        DO_ICALL                                         $4      
         10        ASSIGN                                                   !1, $4
    5    11        INIT_FCALL                                               'var_export'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
    6    14        ECHO                                                     '%0A----------------%0A'
    8    15        INIT_FCALL                                               'preg_split'
         16        SEND_VAL                                                 '%7E%5D%5CK%7E'
         17        FETCH_DIM_R                                      ~8      !1, 0
         18        SEND_VAL                                                 ~8
         19        SEND_VAL                                                 -1
         20        SEND_VAL                                                 1
         21        DO_ICALL                                         $9      
         22        ASSIGN_DIM                                               !1, 0
         23        OP_DATA                                                  $9
    9    24        INIT_FCALL                                               'var_export'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.39 ms | 1001 KiB | 17 Q