3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $dir; public function __construct() { $this->dir = __DIR__; } function aaa() { $t = microtime(true); for ($i = 0; $i < 100000; $i++) { $this->dir; } echo microtime(true) - $t; } } $a = new A(); $a->aaa();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aQHqm
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'aaa'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aQHqm
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_OBJ                                               'dir'
          1        OP_DATA                                                  '%2Fin'
    8     2      > RETURN                                                   null

End of function __construct

Function aaa:
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 = 62) Position 1 = -2
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/aQHqm
function name:  aaa
number of ops:  17
compiled vars:  !0 = $t, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
   12     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->9
   13     6    >   FETCH_OBJ_R                                      ~5      'dir'
          7        FREE                                                     ~5
   12     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 100000
         10      > JMPNZ                                                    ~7, ->6
   15    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $8      
         14        SUB                                              ~9      $8, !0
         15        ECHO                                                     ~9
   16    16      > RETURN                                                   null

End of function aaa

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.35 ms | 1396 KiB | 15 Q