3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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 (11)); /* Mensaje x pantalla */ ?>
based on pdbEp
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4SLW7
function name:  (null)
number of ops:  6
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   NOP                                                      
  15     1        INIT_FCALL                                               'suma'
         2        SEND_VAL                                                 11
         3        DO_FCALL                                      0  $0      
         4        ECHO                                                     $0
  16     5      > 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 = 20
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 9
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 9
Branch analysis from position: 15
Branch analysis from position: 9
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/4SLW7
function name:  suma
number of ops:  25
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, ->20
   6     6    >   ASSIGN                                                   !1, 0
   7     7        ASSIGN                                                   !2, 1
         8      > JMP                                                      ->13
   8     9    >   ADD                                              ~7      !1, !2
        10        ASSIGN                                                   !1, ~7
   7    11        POST_INC                                         ~9      !2
        12        FREE                                                     ~9
        13    >   IS_SMALLER_OR_EQUAL                              ~10     !2, !0
        14      > JMPNZ                                                    ~10, ->9
  10    15    >   ROPE_INIT                                     3  ~12     'Valor+sumatoria+%3D'
        16        ROPE_ADD                                      1  ~12     ~12, !1
        17        ROPE_END                                      2  ~11     ~12, '+%0A'
        18        ECHO                                                     ~11
        19      > JMP                                                      ->24
  12    20    >   ROPE_INIT                                     3  ~15     'Sumatoria+no+cumple+condici%C3%B3n++'
        21        ROPE_ADD                                      1  ~15     ~15, !0
        22        ROPE_END                                      2  ~14     ~15, '+%0A'
        23        ECHO                                                     ~14
  14    24    > > RETURN                                                   null

End of function suma

Generated using Vulcan Logic Dumper, using php 7.3.0