3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST['pulseCheck'] = "seven + four"; $_POST['solution'] = "12"; $lookup = array_flip( ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"] ); if (!preg_match('~^(10|\d) \+ (10|\d)$~', strtr($_POST['pulseCheck'], $lookup), $matches) || $matches[1] + $matches[2] != $_POST['solution'] ) { exit('Something went wrong'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 23, Position 2 = 30
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 32
Branch analysis from position: 31
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/vMdJf
function name:  (null)
number of ops:  33
compiled vars:  !0 = $lookup, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $2      '_POST'
          1        ASSIGN_DIM                                               $2, 'pulseCheck'
          2        OP_DATA                                                  'seven+%2B+four'
    4     3        FETCH_W                      global              $4      '_POST'
          4        ASSIGN_DIM                                               $4, 'solution'
          5        OP_DATA                                                  '12'
    6     6        INIT_FCALL                                               'array_flip'
    7     7        SEND_VAL                                                 <array>
    6     8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !0, $6
   10    10        INIT_FCALL                                               'preg_match'
         11        SEND_VAL                                                 '%7E%5E%2810%7C%5Cd%29+%5C%2B+%2810%7C%5Cd%29%24%7E'
         12        INIT_FCALL                                               'strtr'
         13        FETCH_R                      global              ~8      '_POST'
         14        FETCH_DIM_R                                      ~9      ~8, 'pulseCheck'
         15        SEND_VAL                                                 ~9
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $10     
         18        SEND_VAR                                                 $10
         19        SEND_REF                                                 !1
         20        DO_ICALL                                         $11     
         21        BOOL_NOT                                         ~12     $11
         22      > JMPNZ_EX                                         ~12     ~12, ->30
   11    23    >   FETCH_DIM_R                                      ~13     !1, 1
         24        FETCH_DIM_R                                      ~14     !1, 2
         25        ADD                                              ~15     ~13, ~14
         26        FETCH_R                      global              ~16     '_POST'
         27        FETCH_DIM_R                                      ~17     ~16, 'solution'
         28        IS_NOT_EQUAL                                     ~18     ~15, ~17
         29        BOOL                                             ~12     ~18
         30    > > JMPZ                                                     ~12, ->32
   13    31    > > EXIT                                                     'Something+went+wrong'
   14    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.49 ms | 1003 KiB | 16 Q