3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Today is Monday'; if (preg_match('/(.*)day/', $str, $matches)) { echo $matches[1]; } else { echo '-'; } if (preg_match('/(.*?)day/', $str, $matches)) { echo $matches[1]; } else { echo '-'; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
Branch analysis from position: 20
filename:       /in/GPrSJ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $str, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Today+is+Monday'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%28.%2A%29day%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                         $3      
          6      > JMPZ                                                     $3, ->10
    5     7    >   FETCH_DIM_R                                      ~4      !1, 1
          8        ECHO                                                     ~4
          9      > JMP                                                      ->11
    8    10    >   ECHO                                                     '-'
   11    11    >   INIT_FCALL                                               'preg_match'
         12        SEND_VAL                                                 '%2F%28.%2A%3F%29day%2F'
         13        SEND_VAR                                                 !0
         14        SEND_REF                                                 !1
         15        DO_ICALL                                         $5      
         16      > JMPZ                                                     $5, ->20
   12    17    >   FETCH_DIM_R                                      ~6      !1, 1
         18        ECHO                                                     ~6
         19      > JMP                                                      ->21
   15    20    >   ECHO                                                     '-'
   17    21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.4 ms | 1395 KiB | 15 Q