3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_Math($count = 140000) { $time_start = microtime(true); $mathFunctions = array("abs", "acos", "asin", "atan", "bindec", "floor", "exp", "sin", "tan", "pi", "is_finite", "is_nan", "sqrt"); foreach ($mathFunctions as $key => $function) { if (!function_exists($function)) unset($mathFunctions[$key]); } for ($i=0; $i < $count; $i++) { foreach ($mathFunctions as $function) { $r = call_user_func_array($function, array($i)); echo "."; } } return number_format(microtime(true) - $time_start, 3); } $total = 0; $functions = get_defined_functions();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P5K9p
function name:  (null)
number of ops:  5
compiled vars:  !0 = $total, !1 = $functions
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ASSIGN                                                   !0, 0
   21     1        INIT_FCALL                                               'get_defined_functions'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !1, $3
          4      > RETURN                                                   1

Function test_math:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 15
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 19
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 29
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 29
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 19
Branch analysis from position: 33
Branch analysis from position: 19
Branch analysis from position: 29
Branch analysis from position: 16
filename:       /in/P5K9p
function name:  test_Math
number of ops:  43
compiled vars:  !0 = $count, !1 = $time_start, !2 = $mathFunctions, !3 = $function, !4 = $key, !5 = $i, !6 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      140000
    5     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
    6     5        ASSIGN                                                   !2, <array>
    7     6      > FE_RESET_R                                       $10     !2, ->16
          7    > > FE_FETCH_R                                       ~11     $10, !3, ->16
          8    >   ASSIGN                                                   !4, ~11
    8     9        INIT_FCALL                                               'function_exists'
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                         $13     
         12        BOOL_NOT                                         ~14     $13
         13      > JMPZ                                                     ~14, ->15
         14    >   UNSET_DIM                                                !2, !4
    7    15    > > JMP                                                      ->7
         16    >   FE_FREE                                                  $10
   10    17        ASSIGN                                                   !5, 0
         18      > JMP                                                      ->31
   11    19    > > FE_RESET_R                                       $16     !2, ->29
         20    > > FE_FETCH_R                                               $16, !3, ->29
   12    21    >   INIT_USER_CALL                                0          'call_user_func_array', !3
         22        INIT_ARRAY                                       ~17     !5
         23        SEND_ARRAY                                               ~17
         24        CHECK_UNDEF_ARGS                                         
         25        DO_FCALL                                      0  $18     
         26        ASSIGN                                                   !6, $18
   13    27        ECHO                                                     '.'
   11    28      > JMP                                                      ->20
         29    >   FE_FREE                                                  $16
   10    30        PRE_INC                                                  !5
         31    >   IS_SMALLER                                               !5, !0
         32      > JMPNZ                                                    ~21, ->19
   16    33    >   INIT_FCALL                                               'number_format'
         34        INIT_FCALL                                               'microtime'
         35        SEND_VAL                                                 <true>
         36        DO_ICALL                                         $22     
         37        SUB                                              ~23     $22, !1
         38        SEND_VAL                                                 ~23
         39        SEND_VAL                                                 3
         40        DO_ICALL                                         $24     
         41      > RETURN                                                   $24
   17    42*     > RETURN                                                   null

End of function test_math

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.61 ms | 1392 KiB | 21 Q