3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new \StdClass; $obj->textfield->id = 'text12'; $obj->textfield->text = 'herro'; $anotherObj = new \StdClass; $anotherObj->textfield->id = 'text1'; $anotherObj->textfield->text = 'moarrr text'; $yesAnother = new \StdClass; $yesAnother->textfield->id = 'text11'; $yesAnother->textfield->text = 'omggggg'; $array = array($obj, $anotherObj, $yesAnother); foreach($array as $obj) { preg_match_all('#\d+#', $obj->textfield->id, $matches); var_dump($matches[0][0]); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 32, Position 2 = 46
Branch analysis from position: 32
2 jumps found. (Code = 78) Position 1 = 33, Position 2 = 46
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 46
filename:       /in/O0da1
function name:  (null)
number of ops:  48
compiled vars:  !0 = $obj, !1 = $anotherObj, !2 = $yesAnother, !3 = $array, !4 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $5      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $5
    4     3        FETCH_OBJ_W                                      $8      !0, 'textfield'
          4        ASSIGN_OBJ                                               $8, 'id'
          5        OP_DATA                                                  'text12'
    5     6        FETCH_OBJ_W                                      $10     !0, 'textfield'
          7        ASSIGN_OBJ                                               $10, 'text'
          8        OP_DATA                                                  'herro'
    7     9        NEW                                              $12     'StdClass'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $12
    8    12        FETCH_OBJ_W                                      $15     !1, 'textfield'
         13        ASSIGN_OBJ                                               $15, 'id'
         14        OP_DATA                                                  'text1'
    9    15        FETCH_OBJ_W                                      $17     !1, 'textfield'
         16        ASSIGN_OBJ                                               $17, 'text'
         17        OP_DATA                                                  'moarrr+text'
   11    18        NEW                                              $19     'StdClass'
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !2, $19
   12    21        FETCH_OBJ_W                                      $22     !2, 'textfield'
         22        ASSIGN_OBJ                                               $22, 'id'
         23        OP_DATA                                                  'text11'
   13    24        FETCH_OBJ_W                                      $24     !2, 'textfield'
         25        ASSIGN_OBJ                                               $24, 'text'
         26        OP_DATA                                                  'omggggg'
   15    27        INIT_ARRAY                                       ~26     !0
         28        ADD_ARRAY_ELEMENT                                ~26     !1
         29        ADD_ARRAY_ELEMENT                                ~26     !2
         30        ASSIGN                                                   !3, ~26
   17    31      > FE_RESET_R                                       $28     !3, ->46
         32    > > FE_FETCH_R                                               $28, !0, ->46
   19    33    >   INIT_FCALL                                               'preg_match_all'
         34        SEND_VAL                                                 '%23%5Cd%2B%23'
         35        FETCH_OBJ_R                                      ~29     !0, 'textfield'
         36        FETCH_OBJ_R                                      ~30     ~29, 'id'
         37        SEND_VAL                                                 ~30
         38        SEND_REF                                                 !4
         39        DO_ICALL                                                 
   20    40        INIT_FCALL                                               'var_dump'
         41        FETCH_DIM_R                                      ~32     !4, 0
         42        FETCH_DIM_R                                      ~33     ~32, 0
         43        SEND_VAL                                                 ~33
         44        DO_ICALL                                                 
   17    45      > JMP                                                      ->32
         46    >   FE_FREE                                                  $28
   21    47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.84 ms | 1400 KiB | 17 Q