3v4l.org

run code in 500+ PHP versions simultaneously
<?php $percentage = 0.3; $x = ceil($percentage * 10); $x = min(10, $x); // assure no one messes with range echo str_repeat('o', $x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KThIa
function name:  (null)
number of ops:  14
compiled vars:  !0 = $percentage, !1 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 0.3
    5     1        INIT_FCALL                                                   'ceil'
          2        MUL                                                  ~3      !0, 10
          3        SEND_VAL                                                     ~3
          4        DO_ICALL                                             $4      
          5        ASSIGN                                                       !1, $4
    6     6        FRAMELESS_ICALL_2                min                 ~6      10, !1
          7        ASSIGN                                                       !1, ~6
    8     8        INIT_FCALL                                                   'str_repeat'
          9        SEND_VAL                                                     'o'
         10        SEND_VAR                                                     !1
         11        DO_ICALL                                             $8      
         12        ECHO                                                         $8
         13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.43 ms | 1493 KiB | 15 Q