3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0.14; function roundquarter($i) { $i = $i * 4; $i = round($i); return $i/4; } echo roundquarter($i); function percentage($i) { $i = ($i / 6) * 100; return $i; } echo percentage($i); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dj4Pt
function name:  (null)
number of ops:  10
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0.14
   11     1        INIT_FCALL                                               'roundquarter'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
   19     5        INIT_FCALL                                               'percentage'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0  $3      
          8        ECHO                                                     $3
   20     9      > RETURN                                                   1

Function roundquarter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dj4Pt
function name:  roundquarter
number of ops:  10
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        MUL                                              ~1      !0, 4
          2        ASSIGN                                                   !0, ~1
    7     3        INIT_FCALL                                               'round'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
    8     7        DIV                                              ~5      !0, 4
          8      > RETURN                                                   ~5
    9     9*     > RETURN                                                   null

End of function roundquarter

Function percentage:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dj4Pt
function name:  percentage
number of ops:  6
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        DIV                                              ~1      !0, 6
          2        MUL                                              ~2      ~1, 100
          3        ASSIGN                                                   !0, ~2
   17     4      > RETURN                                                   !0
   18     5*     > RETURN                                                   null

End of function percentage

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.59 ms | 1399 KiB | 17 Q