3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 2; $code = ' a'; $fName = create_function('$i', $code); $start = microtime(true); for($i = 0; $i < $count; $i++){ echo eval($code)."\r\n"; } printf("#1, done in %f\n", microtime(true) - $start); $start = microtime(true); for($i = 0; $i < $count; $i++){ echo $fName($i)."\r\n"; } printf("#2, done in %f\n", microtime(true) - $start); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 13
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 33
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 33
Branch analysis from position: 41
Branch analysis from position: 33
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 13
Branch analysis from position: 19
Branch analysis from position: 13
filename:       /in/jhmjW
function name:  (null)
number of ops:  50
compiled vars:  !0 = $count, !1 = $code, !2 = $fName, !3 = $start, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 2
    3     1        ASSIGN                                                   !1, '%0A++a'
    6     2        INIT_FCALL_BY_NAME                                       'create_function'
          3        SEND_VAL_EX                                              '%24i'
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $7      
          6        ASSIGN                                                   !2, $7
    8     7        INIT_FCALL                                               'microtime'
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !3, $9
    9    11        ASSIGN                                                   !4, 0
         12      > JMP                                                      ->17
   10    13    >   INCLUDE_OR_EVAL                                  $12     !1, EVAL
         14        CONCAT                                           ~13     $12, '%0D%0A'
         15        ECHO                                                     ~13
    9    16        PRE_INC                                                  !4
         17    >   IS_SMALLER                                               !4, !0
         18      > JMPNZ                                                    ~15, ->13
   13    19    >   INIT_FCALL                                               'printf'
         20        SEND_VAL                                                 '%231%2C+done+in+%25f%0A'
         21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $16     
         24        SUB                                              ~17     $16, !3
         25        SEND_VAL                                                 ~17
         26        DO_ICALL                                                 
   15    27        INIT_FCALL                                               'microtime'
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                         $19     
         30        ASSIGN                                                   !3, $19
   16    31        ASSIGN                                                   !4, 0
         32      > JMP                                                      ->39
   17    33    >   INIT_DYNAMIC_CALL                                        !2
         34        SEND_VAR_EX                                              !4
         35        DO_FCALL                                      0  $22     
         36        CONCAT                                           ~23     $22, '%0D%0A'
         37        ECHO                                                     ~23
   16    38        PRE_INC                                                  !4
         39    >   IS_SMALLER                                               !4, !0
         40      > JMPNZ                                                    ~25, ->33
   19    41    >   INIT_FCALL                                               'printf'
         42        SEND_VAL                                                 '%232%2C+done+in+%25f%0A'
         43        INIT_FCALL                                               'microtime'
         44        SEND_VAL                                                 <true>
         45        DO_ICALL                                         $26     
         46        SUB                                              ~27     $26, !3
         47        SEND_VAL                                                 ~27
         48        DO_ICALL                                                 
   20    49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.49 ms | 1400 KiB | 17 Q