3v4l.org

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

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

End of function __construct

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.8 ms | 1395 KiB | 15 Q