3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ <<<STRING 1 + 2 * (3 + (23 + 53 - (132 / 5) + 5) - 1) + 2 / 'test + string' - 52 STRING, <<<STRING 1+2*(3+(23+53-(132/5)+5)-1)+2/'test+string'-52 STRING ]; foreach ($strings as $str) { var_export( preg_split( "~(?:(\((?:[^()]+|(?1))*\))|'[^']*'|[\d.]+|[*/^+-])\K ?~", $str, -1, PREG_SPLIT_NO_EMPTY ) ); echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 14
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/iGXQj
function name:  (null)
number of ops:  16
compiled vars:  !0 = $strings, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1      > FE_RESET_R                                       $3      !0, ->14
          2    > > FE_FETCH_R                                               $3, !1, ->14
   13     3    >   INIT_FCALL                                               'var_export'
   14     4        INIT_FCALL                                               'preg_split'
   15     5        SEND_VAL                                                 '%7E%28%3F%3A%28%5C%28%28%3F%3A%5B%5E%28%29%5D%2B%7C%28%3F1%29%29%2A%5C%29%29%7C%27%5B%5E%27%5D%2A%27%7C%5B%5Cd.%5D%2B%7C%5B%2A%2F%5E%2B-%5D%29%5CK+%3F%7E'
   16     6        SEND_VAR                                                 !1
   17     7        SEND_VAL                                                 -1
   18     8        SEND_VAL                                                 1
   14     9        DO_ICALL                                         $4      
   18    10        SEND_VAR                                                 $4
   13    11        DO_ICALL                                                 
   21    12        ECHO                                                     '%0A'
   12    13      > JMP                                                      ->2
         14    >   FE_FREE                                                  $3
   22    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.45 ms | 1005 KiB | 15 Q