3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getPercent($y, $x){ $percent = $x/$y; return number_format( $percent * 100, 2 ) . '%'; } echo getPercent(363, 24);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Di250
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'getpercent'
          1        SEND_VAL                                                 363
          2        SEND_VAL                                                 24
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function getpercent:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Di250
function name:  getPercent
number of ops:  12
compiled vars:  !0 = $y, !1 = $x, !2 = $percent
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        DIV                                              ~3      !1, !0
          3        ASSIGN                                                   !2, ~3
    5     4        INIT_FCALL                                               'number_format'
          5        MUL                                              ~5      !2, 100
          6        SEND_VAL                                                 ~5
          7        SEND_VAL                                                 2
          8        DO_ICALL                                         $6      
          9        CONCAT                                           ~7      $6, '%25'
         10      > RETURN                                                   ~7
    6    11*     > RETURN                                                   null

End of function getpercent

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.9 ms | 1397 KiB | 16 Q