3v4l.org

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

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

End of function __construct

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F7Kei
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   '1'
   13     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class Derp.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.45 ms | 1388 KiB | 17 Q