3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stringVar = 'iAmSomeRandomString'; $stringArr = array('rando' => 'iAmSomeRandomString'); echo "Start"; $start = microtime(true); echo $stringVar; $laptime = microtime(true); echo $stringArr['rando']; $stop = microtime(true); echo "\n"; printf("%13s: %1.6f\n", "First case", $laptime-$start); printf("%13s: %1.6f\n", "Second case", $stop-$laptime);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/snDII
function name:  (null)
number of ops:  32
compiled vars:  !0 = $stringVar, !1 = $stringArr, !2 = $start, !3 = $laptime, !4 = $stop
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'iAmSomeRandomString'
    4     1        ASSIGN                                                   !1, <array>
    6     2        ECHO                                                     'Start'
    7     3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !2, $7
    8     7        ECHO                                                     !0
    9     8        INIT_FCALL                                               'microtime'
          9        SEND_VAL                                                 <true>
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !3, $9
   10    12        FETCH_DIM_R                                      ~11     !1, 'rando'
         13        ECHO                                                     ~11
   11    14        INIT_FCALL                                               'microtime'
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $12     
         17        ASSIGN                                                   !4, $12
   13    18        ECHO                                                     '%0A'
   14    19        INIT_FCALL                                               'printf'
         20        SEND_VAL                                                 '%2513s%3A+%251.6f%0A'
         21        SEND_VAL                                                 'First+case'
         22        SUB                                              ~14     !3, !2
         23        SEND_VAL                                                 ~14
         24        DO_ICALL                                                 
   15    25        INIT_FCALL                                               'printf'
         26        SEND_VAL                                                 '%2513s%3A+%251.6f%0A'
         27        SEND_VAL                                                 'Second+case'
         28        SUB                                              ~16     !4, !3
         29        SEND_VAL                                                 ~16
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.95 ms | 1007 KiB | 15 Q