3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start=hrtime(true); $code = '<?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");'; $tokens = token_get_all($code); foreach ($tokens as $token) { if (is_array($token)) { echo "Line {$token[2]}: ", token_name($token[0]), " ('{$token[1]}')", PHP_EOL; } } $end=hrtime(true); $eta=$end-$start; echo $eta/1e+6; //nanoseconds to milliseconds
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 30
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 30
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 29
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 29
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/WAaL7
function name:  (null)
number of ops:  40
compiled vars:  !0 = $start, !1 = $code, !2 = $tokens, !3 = $token, !4 = $end, !5 = $eta
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'hrtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $6      
          3        ASSIGN                                                   !0, $6
    5     4        ASSIGN                                                   !1, '%3C%3Fphp+if+%28PHP_INT_SIZE+%21%3D+4%29+die%28%22skip+this+test+is+for+32bit+platform+only%22%29%3B'
    6     5        INIT_FCALL                                               'token_get_all'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $9      
          8        ASSIGN                                                   !2, $9
    8     9      > FE_RESET_R                                       $11     !2, ->30
         10    > > FE_FETCH_R                                               $11, !3, ->30
    9    11    >   TYPE_CHECK                                  128          !3
         12      > JMPZ                                                     ~12, ->29
   10    13    >   ROPE_INIT                                     3  ~15     'Line+'
         14        FETCH_DIM_R                                      ~13     !3, 2
         15        ROPE_ADD                                      1  ~15     ~15, ~13
         16        ROPE_END                                      2  ~14     ~15, '%3A+'
         17        ECHO                                                     ~14
         18        INIT_FCALL                                               'token_name'
         19        FETCH_DIM_R                                      ~17     !3, 0
         20        SEND_VAL                                                 ~17
         21        DO_ICALL                                         $18     
         22        ECHO                                                     $18
         23        ROPE_INIT                                     3  ~21     '+%28%27'
         24        FETCH_DIM_R                                      ~19     !3, 1
         25        ROPE_ADD                                      1  ~21     ~21, ~19
         26        ROPE_END                                      2  ~20     ~21, '%27%29'
         27        ECHO                                                     ~20
         28        ECHO                                                     '%0A'
    8    29    > > JMP                                                      ->10
         30    >   FE_FREE                                                  $11
   14    31        INIT_FCALL                                               'hrtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $23     
         34        ASSIGN                                                   !4, $23
   15    35        SUB                                              ~25     !4, !0
         36        ASSIGN                                                   !5, ~25
   17    37        DIV                                              ~27     !5, 1.0e+6
         38        ECHO                                                     ~27
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.58 ms | 1009 KiB | 16 Q