3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = [ 'application/ld+json', 'application/json', 'text/html', ]; if ($accept = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $a)) { var_dump(implode(',', $accept)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/TkPqE
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $accept
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    9     1        INIT_FCALL                                                   'preg_grep'
          2        SEND_VAL                                                     '%7E%28%3Fi%29%5E%28application%2Fjson%7C%5B%5E%3B%2F+%5Ct%5D%2B%2F%5B%5E%3B%2F+%5Ct%5D%2B%5B%2B%5Djson%29%5B+%5Ct%5D%2A%28%3B.%2A%29%3F%24%7E'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $3      
          5        ASSIGN                                               ~4      !1, $3
          6      > JMPZ                                                         ~4, ->11
   10     7    >   INIT_FCALL                                                   'var_dump'
          8        FRAMELESS_ICALL_2                implode             ~5      '%2C', !1
          9        SEND_VAL                                                     ~5
         10        DO_ICALL                                                     
   11    11    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.11 ms | 2118 KiB | 17 Q