3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public $prop; } $foo = new MyClass(); $foo->prop = 'test1'; $bar = new MyClass(); $foo->prop = 'test1'; $bam = new MyClass(); $bam->prop = 'test1'; $test = array($foo, $bar, $bam); print_r(array_unique($test, SORT_REGULAR));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/shoVo
function name:  (null)
number of ops:  27
compiled vars:  !0 = $foo, !1 = $bar, !2 = $bam, !3 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $4      'MyClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    8     3        ASSIGN_OBJ                                               !0, 'prop'
          4        OP_DATA                                                  'test1'
   10     5        NEW                                              $8      'MyClass'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $8
   11     8        ASSIGN_OBJ                                               !0, 'prop'
          9        OP_DATA                                                  'test1'
   13    10        NEW                                              $12     'MyClass'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $12
   14    13        ASSIGN_OBJ                                               !2, 'prop'
         14        OP_DATA                                                  'test1'
   16    15        INIT_ARRAY                                       ~16     !0
         16        ADD_ARRAY_ELEMENT                                ~16     !1
         17        ADD_ARRAY_ELEMENT                                ~16     !2
         18        ASSIGN                                                   !3, ~16
   18    19        INIT_FCALL                                               'print_r'
         20        INIT_FCALL                                               'array_unique'
         21        SEND_VAR                                                 !3
         22        SEND_VAL                                                 0
         23        DO_ICALL                                         $18     
         24        SEND_VAR                                                 $18
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Class MyClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.08 ms | 1387 KiB | 17 Q