3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); class Pont { public static function validerTaille(float $taille): bool { if ($taille < 50.0) { trigger_error( 'La taille est trop courte. (min 50m)', E_USER_ERROR ); } return true; } public function setLongueur(float $longueur): void { self::validerTaille($longueur); $this->longueur = $longueur; } } $towerBridge = new Pont; $towerBridge->setLongueur(20.0);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d9FkG
function name:  (null)
number of ops:  7
compiled vars:  !0 = $towerBridge
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'Pont'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   28     3        INIT_METHOD_CALL                                         !0, 'setLongueur'
          4        SEND_VAL_EX                                              20
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Pont:
Function validertaille:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/d9FkG
function name:  validerTaille
number of ops:  10
compiled vars:  !0 = $taille
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        IS_SMALLER                                               !0, 50
          2      > JMPZ                                                     ~1, ->7
   10     3    >   INIT_FCALL                                               'trigger_error'
   11     4        SEND_VAL                                                 'La+taille+est+trop+courte.+%28min+50m%29'
   12     5        SEND_VAL                                                 256
   10     6        DO_ICALL                                                 
   16     7    > > RETURN                                                   <true>
   17     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function validertaille

Function setlongueur:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d9FkG
function name:  setLongueur
number of ops:  7
compiled vars:  !0 = $longueur
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   21     1        INIT_STATIC_METHOD_CALL                                  'validerTaille'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
   23     4        ASSIGN_OBJ                                               'longueur'
          5        OP_DATA                                                  !0
   24     6      > RETURN                                                   null

End of function setlongueur

End of class Pont.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.81 ms | 1452 KiB | 14 Q