3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php function sum($x,$y) { $z=$x+$y; return $z; } echo "5 + 10 = " . sum(5,10) . "<br>"; echo "7 + 13 = " . sum(7,13) . "<br>"; echo "2 + 4 = " . sum(2,4); ?> </body> </html>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9UFci
function name:  (null)
number of ops:  23
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Cbody%3E%0A%0A'
   11     1        INIT_FCALL                                               'sum'
          2        SEND_VAL                                                 5
          3        SEND_VAL                                                 10
          4        DO_FCALL                                      0  $0      
          5        CONCAT                                           ~1      '5+%2B+10+%3D+', $0
          6        CONCAT                                           ~2      ~1, '%3Cbr%3E'
          7        ECHO                                                     ~2
   12     8        INIT_FCALL                                               'sum'
          9        SEND_VAL                                                 7
         10        SEND_VAL                                                 13
         11        DO_FCALL                                      0  $3      
         12        CONCAT                                           ~4      '7+%2B+13+%3D+', $3
         13        CONCAT                                           ~5      ~4, '%3Cbr%3E'
         14        ECHO                                                     ~5
   13    15        INIT_FCALL                                               'sum'
         16        SEND_VAL                                                 2
         17        SEND_VAL                                                 4
         18        DO_FCALL                                      0  $6      
         19        CONCAT                                           ~7      '2+%2B+4+%3D+', $6
         20        ECHO                                                     ~7
   15    21        ECHO                                                     '%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
   17    22      > RETURN                                                   1

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

End of function sum

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.69 ms | 944 KiB | 17 Q