3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = [ "Lincoln Crown", "Crown Court", "go holiday", "house fire", "John Hinton", "Hinton Jailed" ]; $output = []; while ($input) { $output[] = $words = array_shift($input); $input = preg_grep('~\b(?:\Q' . str_replace(' ', '\E|\Q', $words) . '\E)\b~', $input, PREG_GREP_INVERT); } var_export($output);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 3
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 3
Branch analysis from position: 23
Branch analysis from position: 3
filename:       /in/iZQkt
function name:  (null)
number of ops:  27
compiled vars:  !0 = $input, !1 = $output, !2 = $words
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   12     2      > JMP                                                      ->22
   13     3    >   INIT_FCALL                                               'array_shift'
          4        SEND_REF                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                           ~7      !2, $6
          7        ASSIGN_DIM                                               !1
          8        OP_DATA                                                  ~7
   14     9        INIT_FCALL                                               'preg_grep'
         10        INIT_FCALL                                               'str_replace'
         11        SEND_VAL                                                 '+'
         12        SEND_VAL                                                 '%5CE%7C%5CQ'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $8      
         15        CONCAT                                           ~9      '%7E%5Cb%28%3F%3A%5CQ', $8
         16        CONCAT                                           ~10     ~9, '%5CE%29%5Cb%7E'
         17        SEND_VAL                                                 ~10
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 1
         20        DO_ICALL                                         $11     
         21        ASSIGN                                                   !0, $11
   12    22    > > JMPNZ                                                    !0, ->3
   16    23    >   INIT_FCALL                                               'var_export'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.14 ms | 1001 KiB | 17 Q