3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sampleFileContents = <<<'TAG' <?php /* --------------------------------------------------------------------------------- - PHP Version : 4.0 - - This code was created on : 2021/11/29 at 00:10 - - Checksum : d8d8000bfc33a4eba1e6b51b8fc71312 - ---------------------------------------------------------------------------------- */ TAG; $tokens = token_get_all($sampleFileContents); $comments = array(); foreach ($tokens as $token) { if ($token[0] == T_COMMENT || $token[0] == T_DOC_COMMENT) { $comments[] = $token[1]; } } print_r($comments);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 19
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 19
Branch analysis from position: 8
2 jumps found. (Code = 47) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 18
Branch analysis from position: 14
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/QItc7
function name:  (null)
number of ops:  24
compiled vars:  !0 = $sampleFileContents, !1 = $tokens, !2 = $comments, !3 = $token
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fphp%0A%2F%2A+---------------------------------------------------------------------------------%0A-++PHP+Version++++++%3A+4.0++++++++++++++++++++++++++++++++++++++++++++++++++-%0A-++This+code+was+created+on+%3A+2021%2F11%2F29+at+00%3A10++++++++++++++++++++++++++++++++++-%0A-++Checksum+++++++++++++++++%3A+d8d8000bfc33a4eba1e6b51b8fc71312+++++++++++++++++++++-%0A----------------------------------------------------------------------------------+%2A%2F'
   12     1        INIT_FCALL                                               'token_get_all'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   13     5        ASSIGN                                                   !2, <array>
   14     6      > FE_RESET_R                                       $8      !1, ->19
          7    > > FE_FETCH_R                                               $8, !3, ->19
   15     8    >   FETCH_DIM_R                                      ~9      !3, 0
          9        IS_EQUAL                                         ~10     ~9, 388
         10      > JMPNZ_EX                                         ~10     ~10, ->14
         11    >   FETCH_DIM_R                                      ~11     !3, 0
         12        IS_EQUAL                                         ~12     ~11, 389
         13        BOOL                                             ~10     ~12
         14    > > JMPZ                                                     ~10, ->18
   16    15    >   FETCH_DIM_R                                      ~14     !3, 1
         16        ASSIGN_DIM                                               !2
         17        OP_DATA                                                  ~14
   14    18    > > JMP                                                      ->7
         19    >   FE_FREE                                                  $8
   19    20        INIT_FCALL                                               'print_r'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.94 ms | 1401 KiB | 17 Q