3v4l.org

run code in 300+ 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 = 14
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/TkPqE
function name:  (null)
number of ops:  15
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, ->14
   10     7    >   INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'implode'
          9        SEND_VAL                                                 '%2C'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
   11    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.48 ms | 1017 KiB | 16 Q