3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL | E_STRICT); define('ITERATIONS', 2000000); function foo($a) { return; } $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/9Q48F
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                                                 
    8     7        INIT_FCALL                                               'microtime'
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !0, $6
    9    11        ASSIGN                                                   !1, 0
         12      > JMP                                                      ->28
   11    13    >   INIT_FCALL                                               'foo'
         14        SEND_VAL                                                 1
         15        DO_FCALL                                      0          
   13    16        ASSIGN                                                   !2, 'foo'
   14    17        INIT_DYNAMIC_CALL                                        !2
         18        SEND_VAL_EX                                              1
         19        DO_FCALL                                      0          
   16    20        INIT_FCALL                                               'foo'
         21        SEND_USER                                                1
         22        DO_FCALL                                      0          
   18    23        INIT_FCALL                                               'foo'
         24        SEND_ARRAY                                               <array>
         25        CHECK_UNDEF_ARGS                                         
         26        DO_FCALL                                      0          
    9    27        PRE_INC                                                  !1
         28    >   FETCH_CONSTANT                                   ~15     'ITERATIONS'
         29        IS_SMALLER                                               !1, ~15
         30      > JMPNZ                                                    ~16, ->13
   21    31    >   INIT_FCALL                                               'microtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $17     
         34        ASSIGN                                                   !3, $17
   22    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

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9Q48F
function name:  foo
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1      > RETURN                                                   null
    6     2*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.2 ms | 1403 KiB | 22 Q