3v4l.org

run code in 300+ PHP versions simultaneously
<?php $method = 'subscribe_moeder'; $_POST['email'] = 'info@example.com'; if(function_exists('_'.$method)) call_user_func('_'.$method); else die(json_encode(array("alert('wrong request " . $method . "')"), JSON_FORCE_OBJECT)); function _subscribe_moeder(){ $email = $_POST['email']; if(!filter_var($email, FILTER_SANITIZE_EMAIL)) die(json_encode(array("$('#email').addClass('has-error')", 'alert("error")'), JSON_FORCE_OBJECT)); else die(json_encode(array("$('#email').removeClass('has-error')", 'alert("success")'), JSON_FORCE_OBJECT)); } // End function _subscribe_moeder
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/1pIjn
function name:  (null)
number of ops:  22
compiled vars:  !0 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'subscribe_moeder'
    4     1        FETCH_W                      global              $2      '_POST'
          2        ASSIGN_DIM                                               $2, 'email'
          3        OP_DATA                                                  'info%40example.com'
    6     4        INIT_FCALL                                               'function_exists'
          5        CONCAT                                           ~4      '_', !0
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                         $5      
          8      > JMPZ                                                     $5, ->13
          9    >   CONCAT                                           ~6      '_', !0
         10        INIT_USER_CALL                                0          'call_user_func', ~6
         11        DO_FCALL                                      0          
         12      > JMP                                                      ->21
    7    13    >   INIT_FCALL                                               'json_encode'
         14        CONCAT                                           ~8      'alert%28%27wrong+request+', !0
         15        CONCAT                                           ~9      ~8, '%27%29'
         16        INIT_ARRAY                                       ~10     ~9
         17        SEND_VAL                                                 ~10
         18        SEND_VAL                                                 16
         19        DO_ICALL                                         $11     
         20      > EXIT                                                     $11
   15    21    > > RETURN                                                   1

Function _subscribe_moeder:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/1pIjn
function name:  _subscribe_moeder
number of ops:  21
compiled vars:  !0 = $email
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_R                      global              ~1      '_POST'
          1        FETCH_DIM_R                                      ~2      ~1, 'email'
          2        ASSIGN                                                   !0, ~2
   11     3        INIT_FCALL                                               'filter_var'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 517
          6        DO_ICALL                                         $4      
          7        BOOL_NOT                                         ~5      $4
          8      > JMPZ                                                     ~5, ->15
   12     9    >   INIT_FCALL                                               'json_encode'
         10        SEND_VAL                                                 <array>
         11        SEND_VAL                                                 16
         12        DO_ICALL                                         $6      
         13      > EXIT                                                     $6
         14*       JMP                                                      ->20
   14    15    >   INIT_FCALL                                               'json_encode'
         16        SEND_VAL                                                 <array>
         17        SEND_VAL                                                 16
         18        DO_ICALL                                         $7      
         19      > EXIT                                                     $7
   15    20*     > RETURN                                                   null

End of function _subscribe_moeder

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.45 ms | 1400 KiB | 19 Q