3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head> <title>Online PHP Script Execution</title> </head> <body> <form method="post" action="#"> Glasses of Milk: <input type="text" name="milk"/><br /> How many eggs: <input type="text" name="egg"/><br /> Spoons of sugar: <input type="text" name="sugar"/><br /> Cups of flour: <input type="text" name="flour"/><br /> <input type="submit" value="submit" name="sub" /> <br /><br /> </form> <?php function cake($milk, $egg, $sugar, $flour) { echo "In your cake you'll have: \n" . $milk . " glasses of milk, \n" . $egg . " eggs, \n". $sugar . "spoons of sugar\n " . $flour . " cups of" . " flour"; $t = $milk + $egg + $sugar + $flour; echo "\n\nPut 'em all in a bowl, mix it up, put it in the oven for ". $t . " minutes and put the oven o 180 degrees. Then put it in the fridge for ". $t*4 . " minutes. Then eat it!"; } if( isset($_POST['sub'])) { cake($_POST['milk'], $_POST['egg'], $_POST['sugar'], $_POST['flour']); } ?> </body> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/TrLEa
function name:  (null)
number of ops:  20
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3Chtml%3E%0A%3Chead%3E%0A%3Ctitle%3EOnline+PHP+Script+Execution%3C%2Ftitle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A%0A%3Cform+method%3D%22post%22+action%3D%22%23%22%3E%0AGlasses+of+Milk%3A+%3Cinput+type%3D%22text%22+name%3D%22milk%22%2F%3E%3Cbr+%2F%3E%0AHow+many+eggs%3A+%3Cinput+type%3D%22text%22+name%3D%22egg%22%2F%3E%3Cbr+%2F%3E%0ASpoons+of+sugar%3A+%3Cinput+type%3D%22text%22+name%3D%22sugar%22%2F%3E%3Cbr+%2F%3E%0ACups+of+flour%3A+%3Cinput+type%3D%22text%22+name%3D%22flour%22%2F%3E%3Cbr+%2F%3E%0A%3Cinput+type%3D%22submit%22+value%3D%22submit%22+name%3D%22sub%22+%2F%3E%0A%3Cbr+%2F%3E%3Cbr+%2F%3E%0A%3C%2Fform%3E%0A%0A'
   26     1        FETCH_IS                                         ~0      '_POST'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~0, 'sub'
          3      > JMPZ                                                     ~1, ->18
   27     4    >   INIT_FCALL                                               'cake'
          5        FETCH_R                      global              ~2      '_POST'
          6        FETCH_DIM_R                                      ~3      ~2, 'milk'
          7        SEND_VAL                                                 ~3
          8        FETCH_R                      global              ~4      '_POST'
          9        FETCH_DIM_R                                      ~5      ~4, 'egg'
         10        SEND_VAL                                                 ~5
         11        FETCH_R                      global              ~6      '_POST'
         12        FETCH_DIM_R                                      ~7      ~6, 'sugar'
         13        SEND_VAL                                                 ~7
         14        FETCH_R                      global              ~8      '_POST'
         15        FETCH_DIM_R                                      ~9      ~8, 'flour'
         16        SEND_VAL                                                 ~9
         17        DO_FCALL                                      0          
   30    18    >   ECHO                                                     '%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   31    19      > RETURN                                                   1

Function cake:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TrLEa
function name:  cake
number of ops:  25
compiled vars:  !0 = $milk, !1 = $egg, !2 = $sugar, !3 = $flour, !4 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   19     4        CONCAT                                           ~5      'In+your+cake+you%27ll+have%3A+%0A', !0
          5        CONCAT                                           ~6      ~5, '+glasses+of+milk%2C+%0A'
          6        CONCAT                                           ~7      ~6, !1
          7        CONCAT                                           ~8      ~7, '+eggs%2C+%0A'
   20     8        CONCAT                                           ~9      ~8, !2
          9        CONCAT                                           ~10     ~9, 'spoons+of+sugar%0A+'
         10        CONCAT                                           ~11     ~10, !3
         11        CONCAT                                           ~12     ~11, '+cups+of'
   21    12        CONCAT                                           ~13     ~12, '+flour'
         13        ECHO                                                     ~13
   22    14        ADD                                              ~14     !0, !1
         15        ADD                                              ~15     ~14, !2
         16        ADD                                              ~16     ~15, !3
         17        ASSIGN                                                   !4, ~16
   23    18        CONCAT                                           ~18     '%0A%0APut+%27em+all+in+a+bowl%2C+mix+it+up%2C+put+it+in+the+oven+for+', !4
         19        CONCAT                                           ~19     ~18, '+minutes+and+put+the+oven+o+180+degrees.+Then+put+it+in+the+fridge+for+'
         20        MUL                                              ~20     !4, 4
         21        CONCAT                                           ~21     ~19, ~20
         22        CONCAT                                           ~22     ~21, '+minutes.+Then+eat+it%21'
         23        ECHO                                                     ~22
   24    24      > RETURN                                                   null

End of function cake

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.66 ms | 1403 KiB | 14 Q