3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 0, $t = -microtime(TRUE); $i < 10000; $i++) { $foo = create_function('stdClass $a, $b = 1', ''); } echo $t + microtime(TRUE), PHP_EOL; for ($i = 0, $t = -microtime(TRUE); $i < 10000; $i++) { $foo = NULL; eval('$foo = function (stdClass $a, $b = 1) {};'); } echo $t + microtime(TRUE);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 28
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 28
Branch analysis from position: 33
Branch analysis from position: 28
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 7
Branch analysis from position: 15
Branch analysis from position: 7
filename:       /in/J0Vf8
function name:  (null)
number of ops:  39
compiled vars:  !0 = $i, !1 = $t, !2 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
          1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $4      
          4        MUL                                              ~5      $4, -1
          5        ASSIGN                                                   !1, ~5
          6      > JMP                                                      ->13
    4     7    >   INIT_FCALL_BY_NAME                                       'create_function'
          8        SEND_VAL_EX                                              'stdClass+%24a%2C+%24b+%3D+1'
          9        SEND_VAL_EX                                              ''
         10        DO_FCALL                                      0  $7      
         11        ASSIGN                                                   !2, $7
    3    12        PRE_INC                                                  !0
         13    >   IS_SMALLER                                               !0, 10000
         14      > JMPNZ                                                    ~10, ->7
    6    15    >   INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $11     
         18        ADD                                              ~12     !1, $11
         19        ECHO                                                     ~12
         20        ECHO                                                     '%0A'
    8    21        ASSIGN                                                   !0, 0
         22        INIT_FCALL                                               'microtime'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $14     
         25        MUL                                              ~15     $14, -1
         26        ASSIGN                                                   !1, ~15
         27      > JMP                                                      ->31
    9    28    >   ASSIGN                                                   !2, null
   10    29        INCLUDE_OR_EVAL                                          '%24foo+%3D+function+%28stdClass+%24a%2C+%24b+%3D+1%29+%7B%7D%3B', EVAL
    8    30        PRE_INC                                                  !0
         31    >   IS_SMALLER                                               !0, 10000
         32      > JMPNZ                                                    ~20, ->28
   12    33    >   INIT_FCALL                                               'microtime'
         34        SEND_VAL                                                 <true>
         35        DO_ICALL                                         $21     
         36        ADD                                              ~22     !1, $21
         37        ECHO                                                     ~22
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.27 ms | 1405 KiB | 15 Q