3v4l.org

run code in 300+ PHP versions simultaneously
<?php // define variables and set to empty values $name = $email = $gender = $comment = $website = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $name = test_input($_POST["name"]); $email = test_input($_POST["email"]); $website = test_input($_POST["website"]); $comment = test_input($_POST["comment"]); $gender = test_input($_POST["gender"]); } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 44
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
filename:       /in/SjXaQ
function name:  (null)
number of ops:  45
compiled vars:  !0 = $name, !1 = $email, !2 = $gender, !3 = $comment, !4 = $website
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                           ~5      !4, ''
          1        ASSIGN                                           ~6      !3, ~5
          2        ASSIGN                                           ~7      !2, ~6
          3        ASSIGN                                           ~8      !1, ~7
          4        ASSIGN                                                   !0, ~8
    5     5        FETCH_R                      global              ~10     '_SERVER'
          6        FETCH_DIM_R                                      ~11     ~10, 'REQUEST_METHOD'
          7        IS_EQUAL                                                 ~11, 'POST'
          8      > JMPZ                                                     ~12, ->44
    6     9    >   INIT_FCALL_BY_NAME                                       'test_input'
         10        CHECK_FUNC_ARG                                           
         11        FETCH_FUNC_ARG               global              $13     '_POST'
         12        FETCH_DIM_FUNC_ARG                               $14     $13, 'name'
         13        SEND_FUNC_ARG                                            $14
         14        DO_FCALL                                      0  $15     
         15        ASSIGN                                                   !0, $15
    7    16        INIT_FCALL_BY_NAME                                       'test_input'
         17        CHECK_FUNC_ARG                                           
         18        FETCH_FUNC_ARG               global              $17     '_POST'
         19        FETCH_DIM_FUNC_ARG                               $18     $17, 'email'
         20        SEND_FUNC_ARG                                            $18
         21        DO_FCALL                                      0  $19     
         22        ASSIGN                                                   !1, $19
    8    23        INIT_FCALL_BY_NAME                                       'test_input'
         24        CHECK_FUNC_ARG                                           
         25        FETCH_FUNC_ARG               global              $21     '_POST'
         26        FETCH_DIM_FUNC_ARG                               $22     $21, 'website'
         27        SEND_FUNC_ARG                                            $22
         28        DO_FCALL                                      0  $23     
         29        ASSIGN                                                   !4, $23
    9    30        INIT_FCALL_BY_NAME                                       'test_input'
         31        CHECK_FUNC_ARG                                           
         32        FETCH_FUNC_ARG               global              $25     '_POST'
         33        FETCH_DIM_FUNC_ARG                               $26     $25, 'comment'
         34        SEND_FUNC_ARG                                            $26
         35        DO_FCALL                                      0  $27     
         36        ASSIGN                                                   !3, $27
   10    37        INIT_FCALL_BY_NAME                                       'test_input'
         38        CHECK_FUNC_ARG                                           
         39        FETCH_FUNC_ARG               global              $29     '_POST'
         40        FETCH_DIM_FUNC_ARG                               $30     $29, 'gender'
         41        SEND_FUNC_ARG                                            $30
         42        DO_FCALL                                      0  $31     
         43        ASSIGN                                                   !2, $31
   19    44    > > RETURN                                                   1

Function test_input:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SjXaQ
function name:  test_input
number of ops:  15
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        INIT_FCALL                                               'trim'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
   15     5        INIT_FCALL                                               'stripslashes'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        ASSIGN                                                   !0, $3
   16     9        INIT_FCALL                                               'htmlspecialchars'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12        ASSIGN                                                   !0, $5
   17    13      > RETURN                                                   !0
   18    14*     > RETURN                                                   null

End of function test_input

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.86 ms | 1400 KiB | 19 Q