3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdclass(); $a->somenumber = 1; $a->name = 'edson'; $b = new stdclass(); $b->somenumber = 1; $b->name = 'chuck'; $c = new stdclass(); $c->somenumber = 1; $c->name = 'edson'; $z = [$a, $b, $c]; print_r (array_unique ($z));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rC9Ys
function name:  (null)
number of ops:  32
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $4      'stdclass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    4     3        ASSIGN_OBJ                                               !0, 'somenumber'
          4        OP_DATA                                                  1
    5     5        ASSIGN_OBJ                                               !0, 'name'
          6        OP_DATA                                                  'edson'
    7     7        NEW                                              $9      'stdclass'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $9
    8    10        ASSIGN_OBJ                                               !1, 'somenumber'
         11        OP_DATA                                                  1
    9    12        ASSIGN_OBJ                                               !1, 'name'
         13        OP_DATA                                                  'chuck'
   11    14        NEW                                              $14     'stdclass'
         15        DO_FCALL                                      0          
         16        ASSIGN                                                   !2, $14
   12    17        ASSIGN_OBJ                                               !2, 'somenumber'
         18        OP_DATA                                                  1
   13    19        ASSIGN_OBJ                                               !2, 'name'
         20        OP_DATA                                                  'edson'
   15    21        INIT_ARRAY                                       ~19     !0
         22        ADD_ARRAY_ELEMENT                                ~19     !1
         23        ADD_ARRAY_ELEMENT                                ~19     !2
         24        ASSIGN                                                   !3, ~19
   17    25        INIT_FCALL                                               'print_r'
         26        INIT_FCALL                                               'array_unique'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                         $21     
         29        SEND_VAR                                                 $21
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.43 ms | 1395 KiB | 17 Q