3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Card { private $rank; private $suit; public function __construct($rank, $suit) { $this->rank = $rank; $this->suit = $suit; } public function getRank() { return $this->rank; } } $xx = new Card(1, 'a'); echo 1; echo $xx.getRank(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HSKRm
function name:  (null)
number of ops:  11
compiled vars:  !0 = $xx
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Card'
          1        SEND_VAL_EX                                              1
          2        SEND_VAL_EX                                              'a'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   17     5        ECHO                                                     1
   18     6        INIT_FCALL_BY_NAME                                       'getRank'
          7        DO_FCALL                                      0  $4      
          8        CONCAT                                           ~5      !0, $4
          9        ECHO                                                     ~5
   19    10      > RETURN                                                   1

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

End of function __construct

Function getrank:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HSKRm
function name:  getRank
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_OBJ_R                                      ~0      'rank'
          1      > RETURN                                                   ~0
   13     2*     > RETURN                                                   null

End of function getrank

End of class Card.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.17 ms | 1385 KiB | 13 Q