3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.87 ms | 1392 KiB | 20 Q