3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); define('ITERATIONS', 2000000); $start = microtime(true); for ($i=0; $i < ITERATIONS; ++$i) { foo(1); $foo = 'foo'; $foo(1); call_user_func('foo', 1); call_user_func_array('foo', array(1)); } $stop = microtime(true); echo "Test name: " . ($stop - $start) . " seconds". PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 13
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 13
Branch analysis from position: 31
Branch analysis from position: 13
filename:       /in/UIMZA
function name:  (null)
number of ops:  41
compiled vars:  !0 = $start, !1 = $i, !2 = $foo, !3 = $stop
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    3     3        INIT_FCALL                                               'define'
          4        SEND_VAL                                                 'ITERATIONS'
          5        SEND_VAL                                                 2000000
          6        DO_ICALL                                                 
    5     7        INIT_FCALL                                               'microtime'
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !0, $6
    6    11        ASSIGN                                                   !1, 0
         12      > JMP                                                      ->28
    8    13    >   INIT_FCALL_BY_NAME                                       'foo'
         14        SEND_VAL_EX                                              1
         15        DO_FCALL                                      0          
   10    16        ASSIGN                                                   !2, 'foo'
   11    17        INIT_DYNAMIC_CALL                                        !2
         18        SEND_VAL_EX                                              1
         19        DO_FCALL                                      0          
   13    20        INIT_USER_CALL                                1          'call_user_func', 'foo'
         21        SEND_USER                                                1
         22        DO_FCALL                                      0          
   15    23        INIT_USER_CALL                                0          'call_user_func_array', 'foo'
         24        SEND_ARRAY                                               <array>
         25        CHECK_UNDEF_ARGS                                         
         26        DO_FCALL                                      0          
    6    27        PRE_INC                                                  !1
         28    >   FETCH_CONSTANT                                   ~15     'ITERATIONS'
         29        IS_SMALLER                                               !1, ~15
         30      > JMPNZ                                                    ~16, ->13
   18    31    >   INIT_FCALL                                               'microtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $17     
         34        ASSIGN                                                   !3, $17
   19    35        SUB                                              ~19     !3, !0
         36        CONCAT                                           ~20     'Test+name%3A+', ~19
         37        CONCAT                                           ~21     ~20, '+seconds'
         38        CONCAT                                           ~22     ~21, '%0A'
         39        ECHO                                                     ~22
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.35 ms | 1392 KiB | 19 Q