3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public $dt; function __construct($dt) { $this->dt = $dt; } } $foo = new Foo(new DateTime); $std = new stdClass; $arr = [$foo, $foo, $std, $std, $std]; var_dump(array_unique($arr, SORT_REGULAR));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rf96r
function name:  (null)
number of ops:  23
compiled vars:  !0 = $foo, !1 = $std, !2 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   NEW                                                  $3      'Foo'
          1        NEW                                                  $4      'DateTime'
          2        DO_FCALL                                          0          
          3        SEND_VAR_NO_REF_EX                                           $4
          4        DO_FCALL                                          0          
          5        ASSIGN                                                       !0, $3
   14     6        NEW                                                  $8      'stdClass'
          7        DO_FCALL                                          0          
          8        ASSIGN                                                       !1, $8
   15     9        INIT_ARRAY                                           ~11     !0
         10        ADD_ARRAY_ELEMENT                                    ~11     !0
         11        ADD_ARRAY_ELEMENT                                    ~11     !1
         12        ADD_ARRAY_ELEMENT                                    ~11     !1
         13        ADD_ARRAY_ELEMENT                                    ~11     !1
         14        ASSIGN                                                       !2, ~11
   17    15        INIT_FCALL                                                   'var_dump'
         16        INIT_FCALL                                                   'array_unique'
         17        SEND_VAR                                                     !2
         18        SEND_VAL                                                     0
         19        DO_ICALL                                             $13     
         20        SEND_VAR                                                     $13
         21        DO_ICALL                                                     
         22      > RETURN                                                       1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rf96r
function name:  __construct
number of ops:  4
compiled vars:  !0 = $dt
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    9     1        ASSIGN_OBJ                                                   'dt'
          2        OP_DATA                                                      !0
   10     3      > RETURN                                                       null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.02 ms | 2254 KiB | 15 Q