3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Math { protected static $pi = 3.14; } class CircleMath extends Math { public static function calculateArea($radio) { return self::pi * pow($radio, 2); } } $radio = 5; echo sprintf('El área del circulo con radio de longitud %s es: %s', $radio, CircleMath::calculateArea($radio)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WkChf
function name:  (null)
number of ops:  11
compiled vars:  !0 = $radio
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, 5
   15     1        INIT_FCALL                                               'sprintf'
          2        SEND_VAL                                                 'El+%C3%A1rea+del+circulo+con+radio+de+longitud+%25s+es%3A+%25s'
          3        SEND_VAR                                                 !0
          4        INIT_STATIC_METHOD_CALL                                  'CircleMath', 'calculateArea'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                         $3      
          9        ECHO                                                     $3
   17    10      > RETURN                                                   1

Class Math: [no user functions]
Class CircleMath:
Function calculatearea:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WkChf
function name:  calculateArea
number of ops:  9
compiled vars:  !0 = $radio
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_CLASS_CONSTANT                             ~1      'pi'
          2        INIT_FCALL                                               'pow'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 2
          5        DO_ICALL                                         $2      
          6        MUL                                              ~3      $2, ~1
          7      > RETURN                                                   ~3
   10     8*     > RETURN                                                   null

End of function calculatearea

End of class CircleMath.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.33 ms | 1395 KiB | 17 Q