3v4l.org

run code in 300+ PHP versions simultaneously
<?php $image = array( 'first', 'second', 'third' ); $str_start = microtime( true ); echo $image['0'] . "\n"; $str_end = ( microtime( true ) - $str_start ) * 1000; $int_start = microtime( true ); echo $image[0]; $int_end = ( microtime( true ) - $int_start ) * 1000; echo "\n"; echo 'Time with string: ' . $str_end . "\n"; echo 'Time with int: ' . $int_end;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L7aNL
function name:  (null)
number of ops:  33
compiled vars:  !0 = $image, !1 = $str_start, !2 = $str_end, !3 = $int_start, !4 = $int_end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
    6     5        FETCH_DIM_R                                      ~8      !0, 0
          6        CONCAT                                           ~9      ~8, '%0A'
          7        ECHO                                                     ~9
    7     8        INIT_FCALL                                               'microtime'
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                         $10     
         11        SUB                                              ~11     $10, !1
         12        MUL                                              ~12     ~11, 1000
         13        ASSIGN                                                   !2, ~12
    9    14        INIT_FCALL                                               'microtime'
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $14     
         17        ASSIGN                                                   !3, $14
   10    18        FETCH_DIM_R                                      ~16     !0, 0
         19        ECHO                                                     ~16
   11    20        INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $17     
         23        SUB                                              ~18     $17, !3
         24        MUL                                              ~19     ~18, 1000
         25        ASSIGN                                                   !4, ~19
   13    26        ECHO                                                     '%0A'
   14    27        CONCAT                                           ~21     'Time+with+string%3A+', !2
         28        CONCAT                                           ~22     ~21, '%0A'
         29        ECHO                                                     ~22
   15    30        CONCAT                                           ~23     'Time+with+int%3A++++', !4
         31        ECHO                                                     ~23
   16    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.89 ms | 1401 KiB | 15 Q