3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $id; /** * @var array */ private $other; public function __construct($id,$other) { $this->id = $id; $this->other = $other; } } $a = new A(1, array( 'truc', 'bidule' => array( 'something' ) )); $b = new A(1, array( 'truc', 'bidule' => array( 'something' ) )); $c = new A(1, array( 'truc', 'bidule' => array( 'something else' ) )); var_dump($a === $b); var_dump($a == $b); var_dump($a === $c); var_dump($a == $c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iHatr
function name:  (null)
number of ops:  32
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $3      'A'
          1        SEND_VAL_EX                                              1
   19     2        SEND_VAL_EX                                              <array>
          3        DO_FCALL                                      0          
   18     4        ASSIGN                                                   !0, $3
   26     5        NEW                                              $6      'A'
          6        SEND_VAL_EX                                              1
   27     7        SEND_VAL_EX                                              <array>
          8        DO_FCALL                                      0          
   26     9        ASSIGN                                                   !1, $6
   34    10        NEW                                              $9      'A'
         11        SEND_VAL_EX                                              1
   35    12        SEND_VAL_EX                                              <array>
         13        DO_FCALL                                      0          
   34    14        ASSIGN                                                   !2, $9
   42    15        INIT_FCALL                                               'var_dump'
         16        IS_IDENTICAL                                     ~12     !0, !1
         17        SEND_VAL                                                 ~12
         18        DO_ICALL                                                 
   43    19        INIT_FCALL                                               'var_dump'
         20        IS_EQUAL                                         ~14     !0, !1
         21        SEND_VAL                                                 ~14
         22        DO_ICALL                                                 
   45    23        INIT_FCALL                                               'var_dump'
         24        IS_IDENTICAL                                     ~16     !0, !2
         25        SEND_VAL                                                 ~16
         26        DO_ICALL                                                 
   46    27        INIT_FCALL                                               'var_dump'
         28        IS_EQUAL                                         ~18     !0, !2
         29        SEND_VAL                                                 ~18
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

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

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.45 ms | 1396 KiB | 15 Q