3v4l.org

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

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

End of function __construct

End of class Point.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.72 ms | 1579 KiB | 14 Q