3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lines = [ '"#InstaFamous: How to Become Famous on Instagram" (2013) 2013-????', '"#1 Single" (2006) {The Rules of Dating (#1.3)} 2006', '"WWE Velocity" (2002) {(2005-11-05)} 2005', '"#Follow" (2011) 2011-????', '"!Next?" (1994) 1994-1995', ]; foreach ($lines as $key => $line) { preg_match('~ ("?(?<showTitle>.*?)"?) \s \((?<showDate>\d{4})\) ([^{}\d]+) ( ({\(.*?\)}) | ({ (?<partTitle>.*?)? (\( \#(?<season>\d+)\.(?<episode>\d+) \))? }) )? \s? (?<partDate>([\d\-\?]+)) ~misx', $line, $data); foreach($data as $key => $value) if(is_int($key)) unset($data[$key]); var_dump($line, $data); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 22
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 22
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 15
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/eR05E
function name:  (null)
number of ops:  24
compiled vars:  !0 = $lines, !1 = $line, !2 = $key, !3 = $data, !4 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1      > FE_RESET_R                                       $6      !0, ->22
          2    > > FE_FETCH_R                                       ~7      $6, !1, ->22
          3    >   ASSIGN                                                   !2, ~7
   13     4        INIT_FCALL                                               'preg_match'
          5        SEND_VAL                                                 '%7E%0A++++++%28%22%3F%28%3F%3CshowTitle%3E.%2A%3F%29%22%3F%29%0A++++++%5Cs%0A++++++%5C%28%28%3F%3CshowDate%3E%5Cd%7B4%7D%29%5C%29%0A++++++%28%5B%5E%7B%7D%5Cd%5D%2B%29%0A++++++%28%0A++++++++%28%7B%5C%28.%2A%3F%5C%29%7D%29%0A++++++++%7C%0A++++++++%28%7B%0A++++++++++%28%3F%3CpartTitle%3E.%2A%3F%29%3F%0A++++++++++%28%5C%28+%5C%23%28%3F%3Cseason%3E%5Cd%2B%29%5C.%28%3F%3Cepisode%3E%5Cd%2B%29+%5C%29%29%3F+%0A++++++++%7D%29%0A++++++%29%3F%0A++++++%5Cs%3F%0A++++++%28%3F%3CpartDate%3E%28%5B%5Cd%5C-%5C%3F%5D%2B%29%29%0A++++++%7Emisx'
   28     6        SEND_VAR                                                 !1
          7        SEND_REF                                                 !3
          8        DO_ICALL                                                 
   30     9      > FE_RESET_R                                       $10     !3, ->16
         10    > > FE_FETCH_R                                       ~11     $10, !4, ->16
         11    >   ASSIGN                                                   !2, ~11
   31    12        TYPE_CHECK                                   16          !2
         13      > JMPZ                                                     ~13, ->15
   32    14    >   UNSET_DIM                                                !3, !2
   30    15    > > JMP                                                      ->10
         16    >   FE_FREE                                                  $10
   34    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                                 
   11    21      > JMP                                                      ->2
         22    >   FE_FREE                                                  $6
   35    23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.43 ms | 1396 KiB | 17 Q