3v4l.org

run code in 300+ PHP versions simultaneously
<?php $separator = "\r\n"; $subject = "test1\ntest2\n"; $line = strtok($subject, $separator); while ($line !== false) { echo $line; $line = strtok( $separator ); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 8
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 8
Branch analysis from position: 15
Branch analysis from position: 8
filename:       /in/ftOMF
function name:  (null)
number of ops:  16
compiled vars:  !0 = $separator, !1 = $subject, !2 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%0D%0A'
    4     1        ASSIGN                                                   !1, 'test1%0Atest2%0A'
    5     2        INIT_FCALL                                               'strtok'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    7     7      > JMP                                                      ->13
    8     8    >   ECHO                                                     !2
    9     9        INIT_FCALL                                               'strtok'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
    7    13    >   TYPE_CHECK                                  1018          !2
         14      > JMPNZ                                                    ~9, ->8
   10    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.77 ms | 1395 KiB | 15 Q