3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class TestClass { public $a; public $b; public $c; public $d; } $inner1 = new TestClass; $inner1->a = 1000; $inner2 = new TestClass; $inner2->a = 1000; $inner3 = new TestClass; $inner3->a = 1001; $o1 = new TestClass; $o1->a = 'abc'; $o1->b = ['a', 'b', 'c']; $o1->c = 123456; $o1->d = $inner1; $o2 = new TestClass; $o2->a = 'abc'; $o2->b = ['a', 'b', 'c']; $o2->c = 123456; $o2->d = $inner2; $o3 = new TestClass; $o3->a = 'abc'; $o3->b = ['a', 'b', 'c']; $o3->c = 123456; $o3->d = $inner3; var_dump([ md5($o1), md5($o2), md5($o3), ]); var_dump($o1 == $o2); var_dump($o1 === $o2);
based on 0bGBF
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Cm96U
function name:  (null)
number of ops:  73
compiled vars:  !0 = $inner1, !1 = $inner2, !2 = $inner3, !3 = $o1, !4 = $o2, !5 = $o3
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  12     1        NEW                                              $7      :-6
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $7
  13     4        ASSIGN_OBJ                                               !0, 'a'
         5        OP_DATA                                                  1000
  15     6        NEW                                              $11     :-2
         7        DO_FCALL                                      0          
         8        ASSIGN                                                   !1, $11
  16     9        ASSIGN_OBJ                                               !1, 'a'
        10        OP_DATA                                                  1000
  18    11        NEW                                              $15     :2
        12        DO_FCALL                                      0          
        13        ASSIGN                                                   !2, $15
  19    14        ASSIGN_OBJ                                               !2, 'a'
        15        OP_DATA                                                  1001
  23    16        NEW                                              $19     :6
        17        DO_FCALL                                      0          
        18        ASSIGN                                                   !3, $19
  24    19        ASSIGN_OBJ                                               !3, 'a'
        20        OP_DATA                                                  'abc'
  25    21        ASSIGN_OBJ                                               !3, 'b'
        22        OP_DATA                                                  <array>
  26    23        ASSIGN_OBJ                                               !3, 'c'
        24        OP_DATA                                                  123456
  27    25        ASSIGN_OBJ                                               !3, 'd'
        26        OP_DATA                                                  !0
  30    27        NEW                                              $26     :15
        28        DO_FCALL                                      0          
        29        ASSIGN                                                   !4, $26
  31    30        ASSIGN_OBJ                                               !4, 'a'
        31        OP_DATA                                                  'abc'
  32    32        ASSIGN_OBJ                                               !4, 'b'
        33        OP_DATA                                                  <array>
  33    34        ASSIGN_OBJ                                               !4, 'c'
        35        OP_DATA                                                  123456
  34    36        ASSIGN_OBJ                                               !4, 'd'
        37        OP_DATA                                                  !1
  36    38        NEW                                              $33     :24
        39        DO_FCALL                                      0          
        40        ASSIGN                                                   !5, $33
  37    41        ASSIGN_OBJ                                               !5, 'a'
        42        OP_DATA                                                  'abc'
  38    43        ASSIGN_OBJ                                               !5, 'b'
        44        OP_DATA                                                  <array>
  39    45        ASSIGN_OBJ                                               !5, 'c'
        46        OP_DATA                                                  123456
  40    47        ASSIGN_OBJ                                               !5, 'd'
        48        OP_DATA                                                  !2
  43    49        INIT_FCALL                                               'var_dump'
  44    50        INIT_FCALL                                               'md5'
        51        SEND_VAR                                                 !3
        52        DO_ICALL                                         $40     
        53        INIT_ARRAY                                       ~41     $40
  45    54        INIT_FCALL                                               'md5'
        55        SEND_VAR                                                 !4
        56        DO_ICALL                                         $42     
        57        ADD_ARRAY_ELEMENT                                ~41     $42
  46    58        INIT_FCALL                                               'md5'
        59        SEND_VAR                                                 !5
        60        DO_ICALL                                         $43     
        61        ADD_ARRAY_ELEMENT                                ~41     $43
        62        SEND_VAL                                                 ~41
        63        DO_ICALL                                                 
  49    64        INIT_FCALL                                               'var_dump'
        65        IS_EQUAL                                         ~45     !3, !4
        66        SEND_VAL                                                 ~45
        67        DO_ICALL                                                 
  50    68        INIT_FCALL                                               'var_dump'
        69        IS_IDENTICAL                                     ~47     !3, !4
        70        SEND_VAL                                                 ~47
        71        DO_ICALL                                                 
        72      > RETURN                                                   1

Class TestClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 7.3.0