3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public $property; public function __construct($property) { $this->property = $property; } } // $obj1 = new MyClass('value'); $obj2 = new MyClass('value'); echo match ($obj1 = new MyClass('value')) { $obj2 => 2, null => 3, $obj1 => 1, };
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 197) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
filename:       /in/p072P
function name:  (null)
number of ops:  25
compiled vars:  !0 = $obj2, !1 = $obj1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'MyClass'
          1        SEND_VAL_EX                                              'value'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   14     4        NEW                                              $5      'MyClass'
          5        SEND_VAL_EX                                              'value'
          6        DO_FCALL                                      0          
          7        ASSIGN                                           ~7      !1, $5
   15     8        CASE_STRICT                                              ~7, !0
          9      > JMPNZ                                                    ~8, ->16
   16    10    >   CASE_STRICT                                              ~7, null
         11      > JMPNZ                                                    ~8, ->18
   17    12    >   CASE_STRICT                                              ~7, !1
         13      > JMPNZ                                                    ~8, ->20
         14    > > JMP                                                      ->15
         15    > > MATCH_ERROR                                              ~7
   15    16    >   QM_ASSIGN                                        ~9      2
         17      > JMP                                                      ->22
   16    18    >   QM_ASSIGN                                        ~9      3
         19      > JMP                                                      ->22
   17    20    >   QM_ASSIGN                                        ~9      1
         21      > JMP                                                      ->22
         22    >   FREE                                                     ~7
         23        ECHO                                                     ~9
   19    24      > RETURN                                                   1

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

End of function __construct

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
125.8 ms | 1424 KiB | 13 Q