3v4l.org

run code in 300+ PHP versions simultaneously
<?php function plusfive($n) { for($i=0;$i<5;$i++) { $n++; } return $n; } $num = 0.000000000000499999999; $numa = $num + 5; $numb = plusfive($num); echo $numa; echo "\n"; echo $numb;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YKheI
function name:  (null)
number of ops:  11
compiled vars:  !0 = $num, !1 = $numa, !2 = $numb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 5.0e-13
   10     1        ADD                                              ~4      !0, 5
          2        ASSIGN                                                   !1, ~4
   11     3        INIT_FCALL                                               'plusfive'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $6      
          6        ASSIGN                                                   !2, $6
   12     7        ECHO                                                     !1
   13     8        ECHO                                                     '%0A'
   14     9        ECHO                                                     !2
         10      > RETURN                                                   1

Function plusfive:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
Branch analysis from position: 3
filename:       /in/YKheI
function name:  plusfive
number of ops:  9
compiled vars:  !0 = $n, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->5
    4     3    >   PRE_INC                                                  !0
    3     4        PRE_INC                                                  !1
          5    >   IS_SMALLER                                               !1, 5
          6      > JMPNZ                                                    ~5, ->3
    6     7    > > RETURN                                                   !0
    7     8*     > RETURN                                                   null

End of function plusfive

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.54 ms | 1398 KiB | 14 Q