3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Rectangle { public function __construct( private float $largeur, private float $hauteur ) {} public function aire(): float { return $this->largeur * $this->hauteur; } } $r = new Rectangle(5, 3); echo "Aire : " . $r->aire();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W1XPR
function name:  (null)
number of ops:  10
compiled vars:  !0 = $r
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   NEW                                                  $1      'Rectangle'
          1        SEND_VAL_EX                                                  5
          2        SEND_VAL_EX                                                  3
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $1
   12     5        INIT_METHOD_CALL                                             !0, 'aire'
          6        DO_FCALL                                          0  $4      
          7        CONCAT                                               ~5      'Aire+%3A+', $4
          8        ECHO                                                         ~5
          9      > RETURN                                                       1

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

End of function __construct

Function aire:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W1XPR
function name:  aire
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                          ~0      'largeur'
          1        FETCH_OBJ_R                                          ~1      'hauteur'
          2        MUL                                                  ~2      ~0, ~1
          3        VERIFY_RETURN_TYPE                                           ~2
          4      > RETURN                                                       ~2
    9     5*       VERIFY_RETURN_TYPE                                           
          6*     > RETURN                                                       null

End of function aire

End of class Rectangle.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
148.65 ms | 1386 KiB | 13 Q