3v4l.org

run code in 300+ PHP versions simultaneously
<?php function display_artistika($int = 100) { for ($i = 0; $i <= $int; $i++) { if (three_and_five($i)) { echo "Inti"; }elseif (three($i) || five($i)) { echo "".three() ? 'Artistika' : 'Solusitama' .""; }else { echo $i; } } } function three_and_five($int) { return three($int) && five($int); } function three($int) { return ($int % 3) == 0; } function five($int) { return ($int % 5) == 0; } display_artistika(); function deret($int) { for ($i = 0; $i <= $int; $i++) { for ($j = 0; $j <= $i; $j++) { echo $j; } echo "\n"; } } deret(6); $a = [ "Inti" , "Artistika", "Solusitama"]; foreach ($a as $str) { echo $str; } function calculate_square($height=0, $width=0) { $f = fopen( 'php://stdin', 'r' ); echo "Tinggi :"; $height = (Int) fread(); echo "n"; echo "Lebar :"; $width = (Int) fread(); echo $height * $width; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/iaKBJ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   INIT_FCALL                                               'display_artistika'
          1        DO_FCALL                                      0          
   46     2        INIT_FCALL                                               'deret'
          3        SEND_VAL                                                 6
          4        DO_FCALL                                      0          
   48     5        ASSIGN                                                   !0, <array>
   50     6      > FE_RESET_R                                       $5      !0, ->10
          7    > > FE_FETCH_R                                               $5, !1, ->10
   51     8    >   ECHO                                                     !1
   50     9      > JMP                                                      ->7
         10    >   FE_FREE                                                  $5
   67    11      > RETURN                                                   1

Function display_artistika:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 3
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 3
Branch analysis from position: 31
Branch analysis from position: 3
Branch analysis from position: 9
2 jumps found. (Code = 47) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 27
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 3
Branch analysis from position: 31
Branch analysis from position: 3
Branch analysis from position: 17
filename:       /in/iaKBJ
function name:  display_artistika
number of ops:  32
compiled vars:  !0 = $int, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      100
    4     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->29
    5     3    >   INIT_FCALL_BY_NAME                                       'three_and_five'
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $3      
          6      > JMPZ                                                     $3, ->9
    7     7    >   ECHO                                                     'Inti'
          8      > JMP                                                      ->28
    8     9    >   INIT_FCALL_BY_NAME                                       'three'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0  $4      
         12      > JMPNZ_EX                                         ~5      $4, ->17
         13    >   INIT_FCALL_BY_NAME                                       'five'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $6      
         16        BOOL                                             ~5      $6
         17    > > JMPZ                                                     ~5, ->27
    9    18    >   INIT_FCALL_BY_NAME                                       'three'
         19        DO_FCALL                                      0  $7      
         20        CONCAT                                           ~8      '', $7
         21      > JMPZ                                                     ~8, ->24
         22    >   QM_ASSIGN                                        ~9      'Artistika'
         23      > JMP                                                      ->25
         24    >   QM_ASSIGN                                        ~9      'Solusitama'
         25    >   ECHO                                                     ~9
         26      > JMP                                                      ->28
   12    27    >   ECHO                                                     !1
    4    28    >   PRE_INC                                                  !1
         29    >   IS_SMALLER_OR_EQUAL                                      !1, !0
         30      > JMPNZ                                                    ~11, ->3
   15    31    > > RETURN                                                   null

End of function display_artistika

Function three_and_five:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/iaKBJ
function name:  three_and_five
number of ops:  11
compiled vars:  !0 = $int
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        INIT_FCALL_BY_NAME                                       'three'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > JMPZ_EX                                          ~2      $1, ->9
          5    >   INIT_FCALL_BY_NAME                                       'five'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $3      
          8        BOOL                                             ~2      $3
          9    > > RETURN                                                   ~2
   20    10*     > RETURN                                                   null

End of function three_and_five

Function three:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iaKBJ
function name:  three
number of ops:  5
compiled vars:  !0 = $int
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   23     1        MOD                                              ~1      !0, 3
          2        IS_EQUAL                                         ~2      ~1, 0
          3      > RETURN                                                   ~2
   24     4*     > RETURN                                                   null

End of function three

Function five:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iaKBJ
function name:  five
number of ops:  5
compiled vars:  !0 = $int
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   RECV                                             !0      
   27     1        MOD                                              ~1      !0, 5
          2        IS_EQUAL                                         ~2      ~1, 0
          3      > RETURN                                                   ~2
   28     4*     > RETURN                                                   null

End of function five

Function deret:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 5
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
Branch analysis from position: 3
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 5
Branch analysis from position: 9
Branch analysis from position: 5
filename:       /in/iaKBJ
function name:  deret
number of ops:  14
compiled vars:  !0 = $int, !1 = $i, !2 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   RECV                                             !0      
   37     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->11
   38     3    >   ASSIGN                                                   !2, 0
          4      > JMP                                                      ->7
   39     5    >   ECHO                                                     !2
   38     6        PRE_INC                                                  !2
          7    >   IS_SMALLER_OR_EQUAL                                      !2, !1
          8      > JMPNZ                                                    ~6, ->5
   41     9    >   ECHO                                                     '%0A'
   37    10        PRE_INC                                                  !1
         11    >   IS_SMALLER_OR_EQUAL                                      !1, !0
         12      > JMPNZ                                                    ~8, ->3
   43    13    > > RETURN                                                   null

End of function deret

Function calculate_square:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iaKBJ
function name:  calculate_square
number of ops:  21
compiled vars:  !0 = $height, !1 = $width, !2 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   58     0  E >   RECV_INIT                                        !0      0
          1        RECV_INIT                                        !1      0
   60     2        INIT_FCALL                                               'fopen'
          3        SEND_VAL                                                 'php%3A%2F%2Fstdin'
          4        SEND_VAL                                                 'r'
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !2, $3
   61     7        ECHO                                                     'Tinggi+%3A'
   62     8        INIT_FCALL                                               'fread'
          9        DO_ICALL                                         $5      
         10        CAST                                          4  ~6      $5
         11        ASSIGN                                                   !0, ~6
   63    12        ECHO                                                     'n'
   64    13        ECHO                                                     'Lebar+%3A'
   65    14        INIT_FCALL                                               'fread'
         15        DO_ICALL                                         $8      
         16        CAST                                          4  ~9      $8
         17        ASSIGN                                                   !1, ~9
   66    18        MUL                                              ~11     !0, !1
         19        ECHO                                                     ~11
   67    20      > RETURN                                                   null

End of function calculate_square

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.82 ms | 1411 KiB | 19 Q