3v4l.org

run code in 500+ PHP versions simultaneously
<?php function recGerRating(&$rating, &$html=null){ if($rating == 0 ) return $html; if($rating < 1){ $html .='<span class="fa fa-star-half-empty"></span>'; $rating-= 0.5; return $html; }else{ $html .= '<span class="fa fa-star"></span>'; $rating-= 1; return recGerRating($rating, $html); } } $r = 0.5; echo recGerRating($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k8RXt
function name:  (null)
number of ops:  6
compiled vars:  !0 = $r
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   ASSIGN                                                       !0, 0.5
   16     1        INIT_FCALL                                                   'recgerrating'
          2        SEND_REF                                                     !0
          3        DO_FCALL                                          0  $2      
          4        ECHO                                                         $2
          5      > RETURN                                                       1

Function recgerrating:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k8RXt
function name:  recGerRating
number of ops:  19
compiled vars:  !0 = $rating, !1 = $html
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      null
    4     2        IS_EQUAL                                                     !0, 0
          3      > JMPZ                                                         ~2, ->5
          4    > > RETURN                                                       !1
    5     5    >   IS_SMALLER                                                   !0, 1
          6      > JMPZ                                                         ~3, ->11
    6     7    >   ASSIGN_OP                                         8          !1, '%3Cspan+class%3D%22fa+fa-star-half-empty%22%3E%3C%2Fspan%3E'
    7     8        ASSIGN_OP                                         2          !0, 0.5
    8     9      > RETURN                                                       !1
    5    10*       JMP                                                          ->18
   10    11    >   ASSIGN_OP                                         8          !1, '%3Cspan+class%3D%22fa+fa-star%22%3E%3C%2Fspan%3E'
   11    12        ASSIGN_OP                                         2          !0, 1
   12    13        INIT_FCALL_BY_NAME                                           'recGerRating'
         14        SEND_VAR_EX                                                  !0
         15        SEND_VAR_EX                                                  !1
         16        DO_FCALL                                          0  $8      
         17      > RETURN                                                       $8
   14    18*     > RETURN                                                       null

End of function recgerrating

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.46 ms | 2054 KiB | 14 Q