3v4l.org

run code in 300+ PHP versions simultaneously
<?php $headers = "Server: lolcatplus\nContent-Type: many/lolcats\n"; $regex1 = '/^(.+): (.+)$/m'; $regex2 = '/^(.+): (.+)$/'; $matches = array(); preg_match($regex1, $headers, $matches); var_dump($matches); $matches = array(); preg_match($regex2, $headers, $matches); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n75MC
function name:  (null)
number of ops:  22
compiled vars:  !0 = $headers, !1 = $regex1, !2 = $regex2, !3 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Server%3A+lolcatplus%0AContent-Type%3A+many%2Flolcats%0A'
    5     1        ASSIGN                                                   !1, '%2F%5E%28.%2B%29%3A+%28.%2B%29%24%2Fm'
    6     2        ASSIGN                                                   !2, '%2F%5E%28.%2B%29%3A+%28.%2B%29%24%2F'
    7     3        ASSIGN                                                   !3, <array>
    9     4        INIT_FCALL                                               'preg_match'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !0
          7        SEND_REF                                                 !3
          8        DO_ICALL                                                 
   10     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                                 
   11    12        ASSIGN                                                   !3, <array>
   12    13        INIT_FCALL                                               'preg_match'
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !0
         16        SEND_REF                                                 !3
         17        DO_ICALL                                                 
   13    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.25 ms | 1395 KiB | 17 Q