3v4l.org

run code in 300+ PHP versions simultaneously
<?php?> <form name="input" action="index.php" method="get"> Type in a number:<input type="text" name="xnumber"> <input type="submit" value="Submit"> </form> <?php function calculate($x, $y) { $newnum = $x * $y; return $newnum; } $multiply = $_GET["xnumber"]; echo "The new number is " . calculate($num, $multiply); $num = calculate($num, $multiply); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ceIuo
function name:  (null)
number of ops:  18
compiled vars:  !0 = $multiply, !1 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   FETCH_CONSTANT                                   ~2      'php'
          1        FREE                                                     ~2
    2     2        ECHO                                                     '%3Cform+name%3D%22input%22+action%3D%22index.php%22+method%3D%22get%22%3E%0A++++++++Type+in+a+number%3A%3Cinput+type%3D%22text%22+name%3D%22xnumber%22%3E%0A+%3Cinput+type%3D%22submit%22+value%3D%22Submit%22%3E%0A+%3C%2Fform%3E%0A%0A'
   14     3        FETCH_R                      global              ~3      '_GET'
          4        FETCH_DIM_R                                      ~4      ~3, 'xnumber'
          5        ASSIGN                                                   !0, ~4
   15     6        INIT_FCALL                                               'calculate'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !0
          9        DO_FCALL                                      0  $6      
         10        CONCAT                                           ~7      'The+new+number+is+', $6
         11        ECHO                                                     ~7
   16    12        INIT_FCALL                                               'calculate'
         13        SEND_VAR                                                 !1
         14        SEND_VAR                                                 !0
         15        DO_FCALL                                      0  $8      
         16        ASSIGN                                                   !1, $8
   17    17      > RETURN                                                   1

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

End of function calculate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.9 ms | 1397 KiB | 15 Q