3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 50; $code = ' $ret = ""; for ($j=0; $j<100; $j++) { $ret.= md5($j.$i.$ret); } return $ret;'; $fName = create_function('$j', $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++){ $f($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/cDsUL
function name:  (null)
number of ops:  46
compiled vars:  !0 = $count, !1 = $code, !2 = $fName, !3 = $start, !4 = $i, !5 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 50
    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%24j.%24i.%24ret%29%3B%0A++%7D%0A++return+%24ret%3B'
    9     2        INIT_FCALL_BY_NAME                                       'create_function'
          3        SEND_VAL_EX                                              '%24j'
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0  $8      
          6        ASSIGN                                                   !2, $8
   11     7        INIT_FCALL                                               'microtime'
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $10     
         10        ASSIGN                                                   !3, $10
   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                                                    ~15, ->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                                         $16     
         22        SUB                                              ~17     $16, !3
         23        SEND_VAL                                                 ~17
         24        DO_ICALL                                                 
   19    25        INIT_FCALL                                               'microtime'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $19     
         28        ASSIGN                                                   !3, $19
   21    29        ASSIGN                                                   !4, 0
         30      > JMP                                                      ->35
   22    31    >   INIT_DYNAMIC_CALL                                        !5
         32        SEND_VAR_EX                                              !4
         33        DO_FCALL                                      0          
   21    34        PRE_INC                                                  !4
         35    >   IS_SMALLER                                               !4, !0
         36      > JMPNZ                                                    ~24, ->31
   24    37    >   INIT_FCALL                                               'printf'
         38        SEND_VAL                                                 '%232%2C+done+in+%25f%0A'
         39        INIT_FCALL                                               'microtime'
         40        SEND_VAL                                                 <true>
         41        DO_ICALL                                         $25     
         42        SUB                                              ~26     $25, !3
         43        SEND_VAL                                                 ~26
         44        DO_ICALL                                                 
   25    45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.85 ms | 1400 KiB | 17 Q