3v4l.org

run code in 300+ PHP versions simultaneously
<?php function conf_path() { static $path; if($path != null) { return $path; } $path = '../sites/swissquote.eu.fx'; return $path; } $time = microtime(true); $i=0; while($i < 60000) { $i++; substr(conf_path(), strrpos(conf_path(), '/')+1); } $time = microtime(true) - $time; echo 'substr() took ' . number_format($time, 3) . ' seconds';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 6
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 6
Branch analysis from position: 22
Branch analysis from position: 6
filename:       /in/SaJEc
function name:  (null)
number of ops:  35
compiled vars:  !0 = $time, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
   17     4        ASSIGN                                                   !1, 0
   18     5      > JMP                                                      ->20
   19     6    >   PRE_INC                                                  !1
   20     7        INIT_FCALL                                               'substr'
          8        INIT_FCALL                                               'conf_path'
          9        DO_FCALL                                      0  $6      
         10        SEND_VAR                                                 $6
         11        INIT_FCALL                                               'strrpos'
         12        INIT_FCALL                                               'conf_path'
         13        DO_FCALL                                      0  $7      
         14        SEND_VAR                                                 $7
         15        SEND_VAL                                                 '%2F'
         16        DO_ICALL                                         $8      
         17        ADD                                              ~9      $8, 1
         18        SEND_VAL                                                 ~9
         19        DO_ICALL                                                 
   18    20    >   IS_SMALLER                                               !1, 60000
         21      > JMPNZ                                                    ~11, ->6
   23    22    >   INIT_FCALL                                               'microtime'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $12     
         25        SUB                                              ~13     $12, !0
         26        ASSIGN                                                   !0, ~13
   25    27        INIT_FCALL                                               'number_format'
         28        SEND_VAR                                                 !0
         29        SEND_VAL                                                 3
         30        DO_ICALL                                         $15     
         31        CONCAT                                           ~16     'substr%28%29+took+', $15
         32        CONCAT                                           ~17     ~16, '+seconds'
         33        ECHO                                                     ~17
         34      > RETURN                                                   1

Function conf_path:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SaJEc
function name:  conf_path
number of ops:  7
compiled vars:  !0 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_STATIC                                              !0
    6     1        IS_NOT_EQUAL                                             !0, null
          2      > JMPZ                                                     ~1, ->4
    7     3    > > RETURN                                                   !0
   10     4    >   ASSIGN                                                   !0, '..%2Fsites%2Fswissquote.eu.fx'
   12     5      > RETURN                                                   !0
   13     6*     > RETURN                                                   null

End of function conf_path

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.1 ms | 1394 KiB | 23 Q