3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Main { private $N; public function run() { $this->N = 77777777; $string = ''; for ( $i = $this->N; $i --> 0; ) { $string .= ' '; } } public function getTime() { $mtime = microtime(); $mtime = explode( ' ', $mtime ); $mtime = $mtime[1] + $mtime[0]; return $mtime; } } $Main = new Main(); $start = $Main->getTime(); $Main->run(); $end = $Main->getTime(); echo "Method execution took " . ( $end - $start ) . " seconds";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1CuKi
function name:  (null)
number of ops:  16
compiled vars:  !0 = $Main, !1 = $start, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $3      'Main'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   30     3        INIT_METHOD_CALL                                         !0, 'getTime'
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !1, $6
   31     6        INIT_METHOD_CALL                                         !0, 'run'
          7        DO_FCALL                                      0          
   32     8        INIT_METHOD_CALL                                         !0, 'getTime'
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !2, $9
   34    11        SUB                                              ~11     !2, !1
         12        CONCAT                                           ~12     'Method+execution+took+', ~11
         13        CONCAT                                           ~13     ~12, '+seconds'
         14        ECHO                                                     ~13
         15      > RETURN                                                   1

Class Main:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 6
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 6
Branch analysis from position: 10
Branch analysis from position: 6
filename:       /in/1CuKi
function name:  run
number of ops:  11
compiled vars:  !0 = $string, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN_OBJ                                               'N'
          1        OP_DATA                                                  77777777
   10     2        ASSIGN                                                   !0, ''
   12     3        FETCH_OBJ_R                                      ~4      'N'
          4        ASSIGN                                                   !1, ~4
          5      > JMP                                                      ->7
   14     6    >   ASSIGN_OP                                     8          !0, '+'
   12     7    >   POST_DEC                                         ~7      !1
          8        IS_SMALLER                                               0, ~7
          9      > JMPNZ                                                    ~8, ->6
   16    10    > > RETURN                                                   null

End of function run

Function gettime:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1CuKi
function name:  getTime
number of ops:  14
compiled vars:  !0 = $mtime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'microtime'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
   21     3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
   22     8        FETCH_DIM_R                                      ~5      !0, 1
          9        FETCH_DIM_R                                      ~6      !0, 0
         10        ADD                                              ~7      ~5, ~6
         11        ASSIGN                                                   !0, ~7
   24    12      > RETURN                                                   !0
   25    13*     > RETURN                                                   null

End of function gettime

End of class Main.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.57 ms | 1400 KiB | 17 Q