3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<'EOD' [2017-03-14 11:48:22] Steve T: Hi! [2017-03-14 11:49:01] Oscar: Hi! :D How are u doin? [2017-03-14 11:50:24] Steve T: Im doing great :P EOD; $handle = fopen("data://text/plain,$str", 'r'); while ( false !== $line = fgets($handle) ) { print_r(sscanf($line, '[%[^]]] %[^:]: %[^\]')); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 9
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 9
Branch analysis from position: 22
Branch analysis from position: 9
filename:       /in/Wq3Nb
function name:  (null)
number of ops:  23
compiled vars:  !0 = $str, !1 = $handle, !2 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5B2017-03-14+11%3A48%3A22%5D+Steve+T%3A+Hi%21%0A%5B2017-03-14+11%3A49%3A01%5D+Oscar%3A+Hi%21+%3AD+How+are+u+doin%3F%0A%5B2017-03-14+11%3A50%3A24%5D+Steve+T%3A+Im+doing+great+%3AP'
    9     1        INIT_FCALL                                               'fopen'
          2        NOP                                                      
          3        FAST_CONCAT                                      ~4      'data%3A%2F%2Ftext%2Fplain%2C', !0
          4        SEND_VAL                                                 ~4
          5        SEND_VAL                                                 'r'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
   10     8      > JMP                                                      ->16
   11     9    >   INIT_FCALL                                               'print_r'
         10        INIT_FCALL                                               'sscanf'
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 '%5B%25%5B%5E%5D%5D%5D+%25%5B%5E%3A%5D%3A+%25%5B%5E%5C%5D'
         13        DO_ICALL                                         $7      
         14        SEND_VAR                                                 $7
         15        DO_ICALL                                                 
   10    16    >   INIT_FCALL                                               'fgets'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $9      
         19        ASSIGN                                           ~10     !2, $9
         20        TYPE_CHECK                                  1018          ~10
         21      > JMPNZ                                                    ~11, ->9
   12    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.92 ms | 1001 KiB | 17 Q