3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FanStruct{ public $date; public $userid; function __construct($date, $id){ $this->date = $date; $this->userid = $id; } } $test = array( new FanStruct( 'today', 1 ) ,new FanStruct( 'today', 1 ) ,new FanStruct( 'tomorrow', 1 ) ); print_r( array_unique( $test ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/B87kd
function name:  (null)
number of ops:  23
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'FanStruct'
          1        SEND_VAL_EX                                              'today'
          2        SEND_VAL_EX                                              1
          3        DO_FCALL                                      0          
          4        INIT_ARRAY                                       ~3      $1
   15     5        NEW                                              $4      'FanStruct'
          6        SEND_VAL_EX                                              'today'
          7        SEND_VAL_EX                                              1
          8        DO_FCALL                                      0          
          9        ADD_ARRAY_ELEMENT                                ~3      $4
   16    10        NEW                                              $6      'FanStruct'
         11        SEND_VAL_EX                                              'tomorrow'
         12        SEND_VAL_EX                                              1
         13        DO_FCALL                                      0          
         14        ADD_ARRAY_ELEMENT                                ~3      $6
   13    15        ASSIGN                                                   !0, ~3
   19    16        INIT_FCALL                                               'print_r'
         17        INIT_FCALL                                               'array_unique'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                         $9      
         20        SEND_VAR                                                 $9
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

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

End of function __construct

End of class FanStruct.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.24 ms | 1396 KiB | 17 Q