3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nameErr= $surnameErr = ""; $name= $surname = ""; $errors= ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if(empty($_POST['customer_name'])){ $errors[] = "Please provide with real human being name"; } if(count($errors)>0) $errors = implode('<br />',$errors); } 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 = 22
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Branch analysis from position: 14
Branch analysis from position: 22
filename:       /in/6RYdh
function name:  (null)
number of ops:  23
compiled vars:  !0 = $nameErr, !1 = $surnameErr, !2 = $name, !3 = $surname, !4 = $errors
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                           ~5      !1, ''
          1        ASSIGN                                                   !0, ~5
    3     2        ASSIGN                                           ~7      !3, ''
          3        ASSIGN                                                   !2, ~7
    4     4        ASSIGN                                                   !4, ''
    5     5        FETCH_R                      global              ~10     '_SERVER'
          6        FETCH_DIM_R                                      ~11     ~10, 'REQUEST_METHOD'
          7        IS_EQUAL                                                 ~11, 'POST'
          8      > JMPZ                                                     ~12, ->22
    7     9    >   FETCH_IS                                         ~13     '_POST'
         10        ISSET_ISEMPTY_DIM_OBJ                         1          ~13, 'customer_name'
         11      > JMPZ                                                     ~14, ->14
    8    12    >   ASSIGN_DIM                                               !4
         13        OP_DATA                                                  'Please+provide+with+real+human+being+name'
   10    14    >   COUNT                                            ~16     !4
         15        IS_SMALLER                                               0, ~16
         16      > JMPZ                                                     ~17, ->22
         17    >   INIT_FCALL                                               'implode'
         18        SEND_VAL                                                 '%3Cbr+%2F%3E'
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                         $18     
         21        ASSIGN                                                   !4, $18
   19    22    > > RETURN                                                   1

Function test_input:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6RYdh
function name:  test_input
number of ops:  15
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     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:
155.55 ms | 1400 KiB | 21 Q