3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hexColorCode = '#ffffff'; $start = microtime(TRUE); str_replace('#', '', $hexColorCode); $end = microtime(TRUE); echo $end - $start; echo "\n----"; $start = microtime(TRUE); ltrim($hexColorCode, '#'); $end = microtime(TRUE); echo $end - $start;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CoeRT
function name:  (null)
number of ops:  32
compiled vars:  !0 = $hexColorCode, !1 = $start, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%23ffffff'
    5     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        INIT_FCALL                                               'str_replace'
          6        SEND_VAL                                                 '%23'
          7        SEND_VAL                                                 ''
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    7    10        INIT_FCALL                                               'microtime'
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !2, $7
    8    14        SUB                                              ~9      !2, !1
         15        ECHO                                                     ~9
    9    16        ECHO                                                     '%0A----'
   10    17        INIT_FCALL                                               'microtime'
         18        SEND_VAL                                                 <true>
         19        DO_ICALL                                         $10     
         20        ASSIGN                                                   !1, $10
   11    21        INIT_FCALL                                               'ltrim'
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 '%23'
         24        DO_ICALL                                                 
   12    25        INIT_FCALL                                               'microtime'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $13     
         28        ASSIGN                                                   !2, $13
   13    29        SUB                                              ~15     !2, !1
         30        ECHO                                                     ~15
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.8 ms | 1007 KiB | 16 Q