3v4l.org

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

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

End of function __construct

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.76 ms | 1396 KiB | 15 Q