3v4l.org

run code in 300+ PHP versions simultaneously
<?php $student_comment_new = 'PDE+PEwuSW50cm9kdWN0aW9uIC0gUGFnZSAxIG9mIDI+TVkgUFJFVEVORCBTRUNPTkQgPGUuMT4='; $fixed = base64_decode($student_comment_new); echo $fixed . "\n\n"; //Decode the entire comment $comment_cltxt = base64_decode($student_comment_new); echo $comment_cltxt . "\n\n"; //get the comment number. $comment_nr = explode('><L.', $comment_cltxt)[0]; $comment_nr = explode('<', $comment_nr)[1]; //get the comment end-text $comment_nr_string = '<' . $comment_nr . '>'; $comment_end_string = '<e.' . $comment_nr . '>'; echo $comment_nr . "\n"; echo $comment_nr_string . "\n"; echo $comment_end_string . "\n"; //get the comment text itself $pos1 = strlen($comment_nr_string); $pos2 = strlen($comment_end_string); $comment_text = substr($comment_cltxt, $pos1, -$pos2); echo $comment_text . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JOFZh
function name:  (null)
number of ops:  51
compiled vars:  !0 = $student_comment_new, !1 = $fixed, !2 = $comment_cltxt, !3 = $comment_nr, !4 = $comment_nr_string, !5 = $comment_end_string, !6 = $pos1, !7 = $pos2, !8 = $comment_text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'PDE%2BPEwuSW50cm9kdWN0aW9uIC0gUGFnZSAxIG9mIDI%2BTVkgUFJFVEVORCBTRUNPTkQgPGUuMT4%3D'
    4     1        INIT_FCALL                                               'base64_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $10     
          4        ASSIGN                                                   !1, $10
    5     5        CONCAT                                           ~12     !1, '%0A%0A'
          6        ECHO                                                     ~12
    8     7        INIT_FCALL                                               'base64_decode'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $13     
         10        ASSIGN                                                   !2, $13
    9    11        CONCAT                                           ~15     !2, '%0A%0A'
         12        ECHO                                                     ~15
   13    13        INIT_FCALL                                               'explode'
         14        SEND_VAL                                                 '%3E%3CL.'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $16     
         17        FETCH_DIM_R                                      ~17     $16, 0
         18        ASSIGN                                                   !3, ~17
   14    19        INIT_FCALL                                               'explode'
         20        SEND_VAL                                                 '%3C'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                         $19     
         23        FETCH_DIM_R                                      ~20     $19, 1
         24        ASSIGN                                                   !3, ~20
   17    25        CONCAT                                           ~22     '%3C', !3
         26        CONCAT                                           ~23     ~22, '%3E'
         27        ASSIGN                                                   !4, ~23
   18    28        CONCAT                                           ~25     '%3Ce.', !3
         29        CONCAT                                           ~26     ~25, '%3E'
         30        ASSIGN                                                   !5, ~26
   21    31        CONCAT                                           ~28     !3, '%0A'
         32        ECHO                                                     ~28
   22    33        CONCAT                                           ~29     !4, '%0A'
         34        ECHO                                                     ~29
   23    35        CONCAT                                           ~30     !5, '%0A'
         36        ECHO                                                     ~30
   26    37        STRLEN                                           ~31     !4
         38        ASSIGN                                                   !6, ~31
   27    39        STRLEN                                           ~33     !5
         40        ASSIGN                                                   !7, ~33
   28    41        INIT_FCALL                                               'substr'
         42        SEND_VAR                                                 !2
         43        SEND_VAR                                                 !6
         44        MUL                                              ~35     !7, -1
         45        SEND_VAL                                                 ~35
         46        DO_ICALL                                         $36     
         47        ASSIGN                                                   !8, $36
   30    48        CONCAT                                           ~38     !8, '%0A'
         49        ECHO                                                     ~38
         50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.67 ms | 1400 KiB | 19 Q