3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Pont { public float $longueur; public float $largeur; public function getSurface(): float { return $this->longueur * $this->largeur; } } $pont = new Pont; $pont->longueur = 286.0; $pont->largeur = 15.0; $surface = $pont->getSurface(); var_dump($surface);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4fQ8I
function name:  (null)
number of ops:  14
compiled vars:  !0 = $pont, !1 = $surface
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'Pont'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        ASSIGN_OBJ                                               !0, 'longueur'
          4        OP_DATA                                                  286
   18     5        ASSIGN_OBJ                                               !0, 'largeur'
          6        OP_DATA                                                  15
   20     7        INIT_METHOD_CALL                                         !0, 'getSurface'
          8        DO_FCALL                                      0  $7      
          9        ASSIGN                                                   !1, $7
   22    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

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

End of function getsurface

End of class Pont.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.13 ms | 1399 KiB | 16 Q