3v4l.org

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

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

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.71 ms | 1396 KiB | 15 Q