3v4l.org

run code in 300+ PHP versions simultaneously
<?php $htmls[] = <<<HTML DATA.tracking.user = { age: "19", name: "John doe", int: 55 } // This works HTML; $htmls[] = <<<HTML DATA.tracking.user = { age: "20", name: "Jane Doe", int: 49 } // This does not works HTML; foreach ($htmls as $html) { var_export(preg_match_all('~(?:\G(?!^),|DATA\.tracking\.user = \{)\s+([^:]+): (\d+|"[^"]*")~', $html, $out, PREG_SET_ORDER) ? $out : []); echo "\n --- \n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 21
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 21
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/vSXm3
function name:  (null)
number of ops:  23
compiled vars:  !0 = $htmls, !1 = $html, !2 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                               !0
    3     1        OP_DATA                                                  'DATA.tracking.user+%3D+%7B+age%3A+%2219%22%2C+name%3A+%22John+doe%22%2C+int%3A+55+%7D+%2F%2F+This+works'
    6     2        ASSIGN_DIM                                               !0
    7     3        OP_DATA                                                  'DATA.tracking.user+%3D+%7B+%0A%09age%3A+%2220%22%2C+%0A%09name%3A+%22Jane+Doe%22%2C%0A%09int%3A+49%0A%7D+%2F%2F+This+does+not+works'
   14     4      > FE_RESET_R                                       $5      !0, ->21
          5    > > FE_FETCH_R                                               $5, !1, ->21
   15     6    >   INIT_FCALL                                               'var_export'
          7        INIT_FCALL                                               'preg_match_all'
          8        SEND_VAL                                                 '%7E%28%3F%3A%5CG%28%3F%21%5E%29%2C%7CDATA%5C.tracking%5C.user+%3D+%5C%7B%29%5Cs%2B%28%5B%5E%3A%5D%2B%29%3A+%28%5Cd%2B%7C%22%5B%5E%22%5D%2A%22%29%7E'
          9        SEND_VAR                                                 !1
         10        SEND_REF                                                 !2
         11        SEND_VAL                                                 2
         12        DO_ICALL                                         $6      
         13      > JMPZ                                                     $6, ->16
         14    >   QM_ASSIGN                                        ~7      !2
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~7      <array>
         17    >   SEND_VAL                                                 ~7
         18        DO_ICALL                                                 
   16    19        ECHO                                                     '%0A+---+%0A'
   14    20      > JMP                                                      ->5
         21    >   FE_FREE                                                  $5
   17    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.41 ms | 1004 KiB | 15 Q