3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.25 ms | 1400 KiB | 20 Q