3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump([ $original_set = [ 'arrayobject' => new arrayobject( [3] ), 'reference?' => [5] ], $original_serialized = serialize( $original_set ), $original_unserialized = unserialize( $original_serialized ), $withreference_serialized = preg_replace( '/a:1:{i:0;i:5;}}/', 'R:4;}', $original_serialized ), $withreference_unserialized = unserialize( $withreference_serialized ), $withreference_unserialized['reference?'][9] = 8, $referenced_arrayobject = & $withreference_unserialized['arrayobject'], $reference_array = & $withreference_unserialized['reference?'], $withreference_unserialized, ( ( $referenced_arrayobject[9] ) === ( $reference_array[9] ) ) ? 'looks like a reference' : 'does not look like a reference' , ]) ;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iAuOL
function name:  (null)
number of ops:  52
compiled vars:  !0 = $original_set, !1 = $original_serialized, !2 = $original_unserialized, !3 = $withreference_serialized, !4 = $withreference_unserialized, !5 = $referenced_arrayobject, !6 = $reference_array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
    4     1        NEW                                              $7      'arrayobject'
          2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
          4        INIT_ARRAY                                       ~9      $7, 'arrayobject'
          5        ADD_ARRAY_ELEMENT                                ~9      <array>, 'reference%3F'
          6        ASSIGN                                           ~10     !0, ~9
          7        INIT_ARRAY                                       ~11     ~10
    5     8        INIT_FCALL                                               'serialize'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $12     
         11        ASSIGN                                           ~13     !1, $12
         12        ADD_ARRAY_ELEMENT                                ~11     ~13
    6    13        INIT_FCALL                                               'unserialize'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $14     
         16        ASSIGN                                           ~15     !2, $14
         17        ADD_ARRAY_ELEMENT                                ~11     ~15
    8    18        INIT_FCALL                                               'preg_replace'
         19        SEND_VAL                                                 '%2Fa%3A1%3A%7Bi%3A0%3Bi%3A5%3B%7D%7D%2F'
         20        SEND_VAL                                                 'R%3A4%3B%7D'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $16     
         23        ASSIGN                                           ~17     !3, $16
         24        ADD_ARRAY_ELEMENT                                ~11     ~17
    9    25        INIT_FCALL                                               'unserialize'
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                         $18     
         28        ASSIGN                                           ~19     !4, $18
         29        ADD_ARRAY_ELEMENT                                ~11     ~19
   10    30        FETCH_DIM_W                                      $20     !4, 'reference%3F'
         31        ASSIGN_DIM                                       ~21     $20, 9
         32        OP_DATA                                                  8
         33        ADD_ARRAY_ELEMENT                                ~11     ~21
   12    34        FETCH_DIM_W                                      $22     !4, 'arrayobject'
         35        ASSIGN_REF                                       $23     !5, $22
         36        ADD_ARRAY_ELEMENT                                ~11     $23
   13    37        FETCH_DIM_W                                      $24     !4, 'reference%3F'
         38        ASSIGN_REF                                       $25     !6, $24
         39        ADD_ARRAY_ELEMENT                                ~11     $25
   15    40        ADD_ARRAY_ELEMENT                                ~11     !4
   16    41        FETCH_DIM_R                                      ~26     !5, 9
         42        FETCH_DIM_R                                      ~27     !6, 9
         43        IS_IDENTICAL                                             ~26, ~27
         44      > JMPZ                                                     ~28, ->47
   17    45    >   QM_ASSIGN                                        ~29     'looks+like+a+reference'
         46      > JMP                                                      ->48
         47    >   QM_ASSIGN                                        ~29     'does+not+look+like+a+reference'
         48    >   ADD_ARRAY_ELEMENT                                ~11     ~29
         49        SEND_VAL                                                 ~11
         50        DO_ICALL                                                 
   18    51      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.92 ms | 1400 KiB | 21 Q