3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 50; $start = microtime(true); $code = ' $ret = ""; for ($i=0; $i<100; $i++) { $ret.= md5($i.$ret); } return $ret; '; for($i = 0; $i < $count; $i++) { eval($code); } printf("#1, result is %d, done in %f\n", $y, microtime(true) - $start); $start = microtime(true); $f = function() { // return ++$y; $ret = ''; for ($i=0; $i<100; $i++) { $ret.= md5($i.$ret); } return $ret; }; for($i = 0; $i < $count; $i++) { $f(); } printf("#2, result is %d, done in %f\n", $y, microtime(true) - $start); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 8
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 29
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 29
Branch analysis from position: 34
Branch analysis from position: 29
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 8
Branch analysis from position: 12
Branch analysis from position: 8
filename:       /in/TBPaH
function name:  (null)
number of ops:  44
compiled vars:  !0 = $count, !1 = $start, !2 = $code, !3 = $i, !4 = $y, !5 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 50
    3     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
    4     5        ASSIGN                                                   !2, '%0A++++++++%24ret+%3D+%22%22%3B%0A++++++++for+%28%24i%3D0%3B+%24i%3C100%3B+%24i%2B%2B%29+%7B%0A++++++++++++%24ret.%3D+md5%28%24i.%24ret%29%3B%0A++++++++%7D%0A++++++++return+%24ret%3B%0A'
   11     6        ASSIGN                                                   !3, 0
          7      > JMP                                                      ->10
   14     8    >   INCLUDE_OR_EVAL                                          !2, EVAL
   11     9        PRE_INC                                                  !3
         10    >   IS_SMALLER                                               !3, !0
         11      > JMPNZ                                                    ~13, ->8
   17    12    >   INIT_FCALL                                               'printf'
         13        SEND_VAL                                                 '%231%2C+result+is+%25d%2C+done+in+%25f%0A'
         14        SEND_VAR                                                 !4
         15        INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $14     
         18        SUB                                              ~15     $14, !1
         19        SEND_VAL                                                 ~15
         20        DO_ICALL                                                 
   19    21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $17     
         24        ASSIGN                                                   !1, $17
   20    25        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FTBPaH%3A20%240'
         26        ASSIGN                                                   !5, ~19
   29    27        ASSIGN                                                   !3, 0
         28      > JMP                                                      ->32
   32    29    >   INIT_DYNAMIC_CALL                                        !5
         30        DO_FCALL                                      0          
   29    31        PRE_INC                                                  !3
         32    >   IS_SMALLER                                               !3, !0
         33      > JMPNZ                                                    ~24, ->29
   35    34    >   INIT_FCALL                                               'printf'
         35        SEND_VAL                                                 '%232%2C+result+is+%25d%2C+done+in+%25f%0A'
         36        SEND_VAR                                                 !4
         37        INIT_FCALL                                               'microtime'
         38        SEND_VAL                                                 <true>
         39        DO_ICALL                                         $25     
         40        SUB                                              ~26     $25, !1
         41        SEND_VAL                                                 ~26
         42        DO_ICALL                                                 
   36    43      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FTBPaH%3A20%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
Branch analysis from position: 3
filename:       /in/TBPaH
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $ret, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   ASSIGN                                                   !0, ''
   24     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->9
   25     3    >   INIT_FCALL                                               'md5'
          4        CONCAT                                           ~4      !1, !0
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                         $5      
          7        ASSIGN_OP                                     8          !0, $5
   24     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 100
         10      > JMPNZ                                                    ~8, ->3
   27    11    > > RETURN                                                   !0
   28    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FTBPaH%3A20%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.43 ms | 1400 KiB | 19 Q