3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a() { return; } function b() { return true; } $start = microtime(true); for ($i = 0; $i<9999; $i++) { a(); } $end = microtime(true); echo "A :".($end-$start)."\n"; $start = microtime(true); for ($i = 0; $i<9999; $i++) { b(); } $end = microtime(true); echo "B :".($end-$start)."\n";
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 = 6
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 25
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 25
Branch analysis from position: 30
Branch analysis from position: 25
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 6
Branch analysis from position: 11
Branch analysis from position: 6
filename:       /in/Lp1lu
function name:  (null)
number of ops:  39
compiled vars:  !0 = $start, !1 = $i, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
   12     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->9
   13     6    >   INIT_FCALL                                               'a'
          7        DO_FCALL                                      0          
   12     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 9999
         10      > JMPNZ                                                    ~8, ->6
   15    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $9      
         14        ASSIGN                                                   !2, $9
   16    15        SUB                                              ~11     !2, !0
         16        CONCAT                                           ~12     'A+%3A', ~11
         17        CONCAT                                           ~13     ~12, '%0A'
         18        ECHO                                                     ~13
   19    19        INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $14     
         22        ASSIGN                                                   !0, $14
   20    23        ASSIGN                                                   !1, 0
         24      > JMP                                                      ->28
   21    25    >   INIT_FCALL                                               'b'
         26        DO_FCALL                                      0          
   20    27        PRE_INC                                                  !1
         28    >   IS_SMALLER                                               !1, 9999
         29      > JMPNZ                                                    ~19, ->25
   23    30    >   INIT_FCALL                                               'microtime'
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $20     
         33        ASSIGN                                                   !2, $20
   24    34        SUB                                              ~22     !2, !0
         35        CONCAT                                           ~23     'B+%3A', ~22
         36        CONCAT                                           ~24     ~23, '%0A'
         37        ECHO                                                     ~24
         38      > RETURN                                                   1

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

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Lp1lu
function name:  b
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   <true>
    9     1*     > RETURN                                                   null

End of function b

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.26 ms | 1403 KiB | 17 Q