3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 2; $code = ' $ret = ""; for ($j=0; $j<100; $j++) { $ret.= md5($i.$j.$ret); } return $i;'; $fName = create_function('$i', $code); $start = microtime(true); for($i = 0; $i < $count; $i++){ echo eval($code)."<br />"; } printf("#1, done in %f\n", microtime(true) - $start); $start = microtime(true); for($i = 0; $i < $count; $i++){ echo $fName($i)."<br />"; } 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/QlrLG
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++%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+%24i%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                                                      ->17
   14    13    >   INCLUDE_OR_EVAL                                  $12     !1, EVAL
         14        CONCAT                                           ~13     $12, '%3Cbr+%2F%3E'
         15        ECHO                                                     ~13
   13    16        PRE_INC                                                  !4
         17    >   IS_SMALLER                                               !4, !0
         18      > JMPNZ                                                    ~15, ->13
   17    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                                                 
   19    27        INIT_FCALL                                               'microtime'
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                         $19     
         30        ASSIGN                                                   !3, $19
   20    31        ASSIGN                                                   !4, 0
         32      > JMP                                                      ->39
   21    33    >   INIT_DYNAMIC_CALL                                        !2
         34        SEND_VAR_EX                                              !4
         35        DO_FCALL                                      0  $22     
         36        CONCAT                                           ~23     $22, '%3Cbr+%2F%3E'
         37        ECHO                                                     ~23
   20    38        PRE_INC                                                  !4
         39    >   IS_SMALLER                                               !4, !0
         40      > JMPNZ                                                    ~25, ->33
   23    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                                                 
   24    49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.64 ms | 1392 KiB | 17 Q