3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/-/'; if (rand(0,1)) { $pattern = 'foo'; } var_dump(preg_split($pattern, '', '-1', PREG_SPLIT_NO_EMPTY));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/495b1
function name:  (null)
number of ops:  17
compiled vars:  !0 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F-%2F'
    4     1        INIT_FCALL                                               'rand'
          2        SEND_VAL                                                 0
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->7
    5     6    >   ASSIGN                                                   !0, 'foo'
    7     7    >   INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'preg_split'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 ''
         11        SEND_VAL                                                 '-1'
         12        SEND_VAL                                                 1
         13        DO_ICALL                                         $4      
         14        SEND_VAR                                                 $4
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.56 ms | 1001 KiB | 16 Q