3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r['crime']= (string)print("hello world"); $input = "\$sucrate=" . str_ireplace(array("LEVEL", "EXP", "WILL", "IQ"), array(1,2,3,4), $r['crime']) . ";"; $tokens = token_get_all("<?php {$input}"); $expr = ''; foreach($tokens as $token){ if(is_string($token)){ if(in_array($token, array('(', ')', '+', '-', '/', '*'), true)) $expr .= $token; continue; } list($id, $text) = $token; if(in_array($id, array(T_DNUMBER, T_LNUMBER))) $expr .= $text; } eval("\$result = {$expr};"); print "\nexpr = " . $expr; print "\nres = " . $result;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 41
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 41
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 27
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 27
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 40
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 40
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
filename:       /in/7Fomj
function name:  (null)
number of ops:  51
compiled vars:  !0 = $r, !1 = $input, !2 = $tokens, !3 = $expr, !4 = $token, !5 = $id, !6 = $text, !7 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     'hello+world'
          1        CAST                                          6  ~9      1
          2        ASSIGN_DIM                                               !0, 'crime'
          3        OP_DATA                                                  ~9
    3     4        INIT_FCALL                                               'str_ireplace'
          5        SEND_VAL                                                 <array>
          6        SEND_VAL                                                 <array>
          7        FETCH_DIM_R                                      ~10     !0, 'crime'
          8        SEND_VAL                                                 ~10
          9        DO_ICALL                                         $11     
         10        CONCAT                                           ~12     '%24sucrate%3D', $11
         11        CONCAT                                           ~13     ~12, '%3B'
         12        ASSIGN                                                   !1, ~13
    5    13        INIT_FCALL                                               'token_get_all'
         14        NOP                                                      
         15        FAST_CONCAT                                      ~15     '%3C%3Fphp+', !1
         16        SEND_VAL                                                 ~15
         17        DO_ICALL                                         $16     
         18        ASSIGN                                                   !2, $16
    6    19        ASSIGN                                                   !3, ''
    8    20      > FE_RESET_R                                       $19     !2, ->41
         21    > > FE_FETCH_R                                               $19, !4, ->41
   10    22    >   TYPE_CHECK                                   64          !4
         23      > JMPZ                                                     ~20, ->28
   12    24    >   IN_ARRAY                                                 !4, <array>
         25      > JMPZ                                                     ~21, ->27
   13    26    >   ASSIGN_OP                                     8          !3, !4
   15    27    > > JMP                                                      ->21
   18    28    >   QM_ASSIGN                                        ~23     !4
         29        FETCH_LIST_R                                     $24     ~23, 0
         30        ASSIGN                                                   !5, $24
         31        FETCH_LIST_R                                     $26     ~23, 1
         32        ASSIGN                                                   !6, $26
         33        FREE                                                     ~23
   20    34        INIT_FCALL                                               'in_array'
         35        SEND_VAR                                                 !5
         36        SEND_VAL                                                 <array>
         37        DO_ICALL                                         $28     
         38      > JMPZ                                                     $28, ->40
   21    39    >   ASSIGN_OP                                     8          !3, !6
    8    40    > > JMP                                                      ->21
         41    >   FE_FREE                                                  $19
   24    42        ROPE_INIT                                     3  ~31     '%24result+%3D+'
         43        ROPE_ADD                                      1  ~31     ~31, !3
         44        ROPE_END                                      2  ~30     ~31, '%3B'
         45        INCLUDE_OR_EVAL                                          ~30, EVAL
   26    46        CONCAT                                           ~34     '%0Aexpr+%3D+', !3
         47        ECHO                                                     ~34
   27    48        CONCAT                                           ~35     '%0Ares+%3D+', !7
         49        ECHO                                                     ~35
   28    50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.34 ms | 1440 KiB | 16 Q