3v4l.org

run code in 300+ PHP versions simultaneously
<?php function square($i): int { return $i*$i; } $i = 2; while (true) { echo $i . PHP_EOL; $i = square($i); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
Branch analysis from position: 2
filename:       /in/foqum
function name:  (null)
number of ops:  10
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 2
    8     1      > JMP                                                      ->8
    9     2    >   CONCAT                                           ~2      !0, '%0A'
          3        ECHO                                                     ~2
   10     4        INIT_FCALL                                               'square'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $3      
          7        ASSIGN                                                   !0, $3
    8     8    > > JMPNZ                                                    <true>, ->2
   11     9    > > RETURN                                                   1

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

End of function square

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.74 ms | 1397 KiB | 14 Q