3v4l.org

run code in 300+ PHP versions simultaneously
<?php $params = "colorgroup-b;test;colorgroup-a;abc"; var_dump(array_includes("colorgroup", $params)); //outputs: colorgroup-b function array_includes($needle, $params) { return preg_match_all('/[^;]*' . preg_quote($needle, '/') . '[^;]*/', $params, $m) ? $m[0] : false; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Re45d
function name:  (null)
number of ops:  9
compiled vars:  !0 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'colorgroup-b%3Btest%3Bcolorgroup-a%3Babc'
    4     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL_BY_NAME                                       'array_includes'
          3        SEND_VAL_EX                                              'colorgroup'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
    8     8      > RETURN                                                   1

Function array_includes:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Re45d
function name:  array_includes
number of ops:  20
compiled vars:  !0 = $needle, !1 = $params, !2 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        INIT_FCALL                                               'preg_match_all'
          3        INIT_FCALL                                               'preg_quote'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 '%2F'
          6        DO_ICALL                                         $3      
          7        CONCAT                                           ~4      '%2F%5B%5E%3B%5D%2A', $3
          8        CONCAT                                           ~5      ~4, '%5B%5E%3B%5D%2A%2F'
          9        SEND_VAL                                                 ~5
         10        SEND_VAR                                                 !1
         11        SEND_REF                                                 !2
         12        DO_ICALL                                         $6      
         13      > JMPZ                                                     $6, ->17
         14    >   FETCH_DIM_R                                      ~7      !2, 0
         15        QM_ASSIGN                                        ~8      ~7
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~8      <false>
         18    > > RETURN                                                   ~8
    8    19*     > RETURN                                                   null

End of function array_includes

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.2 ms | 1396 KiB | 19 Q