3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Función Function suma ($valor) { //la función if($valor >0 and $valor <= 10){ //formula de la función $total=0; for ($i = 1; $i <= $valor; $i++){ //sentencias de la función $total=$total+$i; } echo "Valor sumatoria =$total \n"; // permite establecer la cadena }else { echo "Sumatoria no cumple condición $valor \n"; // en caso de números negativos } } print (suma (10)); /* Mensaje x pantalla */ ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aUQJS9
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'suma'
          1        SEND_VAL                                                 10
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   16     4      > RETURN                                                   1

Function suma:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 9
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 9
Branch analysis from position: 14
Branch analysis from position: 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/aUQJS9
function name:  suma
number of ops:  24
compiled vars:  !0 = $valor, !1 = $total, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        IS_SMALLER                                       ~3      0, !0
          2      > JMPZ_EX                                          ~3      ~3, ->5
          3    >   IS_SMALLER_OR_EQUAL                              ~4      !0, 10
          4        BOOL                                             ~3      ~4
          5    > > JMPZ                                                     ~3, ->19
    6     6    >   ASSIGN                                                   !1, 0
    7     7        ASSIGN                                                   !2, 1
          8      > JMP                                                      ->12
    8     9    >   ADD                                              ~7      !1, !2
         10        ASSIGN                                                   !1, ~7
    7    11        PRE_INC                                                  !2
         12    >   IS_SMALLER_OR_EQUAL                                      !2, !0
         13      > JMPNZ                                                    ~10, ->9
   10    14    >   ROPE_INIT                                     3  ~12     'Valor+sumatoria+%3D'
         15        ROPE_ADD                                      1  ~12     ~12, !1
         16        ROPE_END                                      2  ~11     ~12, '+%0A'
         17        ECHO                                                     ~11
         18      > JMP                                                      ->23
   12    19    >   ROPE_INIT                                     3  ~15     'Sumatoria+no+cumple+condici%C3%B3n++'
         20        ROPE_ADD                                      1  ~15     ~15, !0
         21        ROPE_END                                      2  ~14     ~15, '+%0A'
         22        ECHO                                                     ~14
   14    23    > > RETURN                                                   null

End of function suma

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.99 ms | 1399 KiB | 14 Q