3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = str_repeat('foo', 500000); $y = 'bar'; $before = microtime(1); $x = $x . $y; printf('%f'."\n", microtime(1) - $before); $x = str_repeat('foo', 500000); $y = 'bar'; $before = microtime(1); $x .= $y; printf('%f'."\n", microtime(1) - $before);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XQTDc
function name:  (null)
number of ops:  40
compiled vars:  !0 = $x, !1 = $y, !2 = $before
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 'foo'
          2        SEND_VAL                                                 500000
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    4     5        ASSIGN                                                   !1, 'bar'
    6     6        INIT_FCALL                                               'microtime'
          7        SEND_VAL                                                 1
          8        DO_ICALL                                         $6      
          9        ASSIGN                                                   !2, $6
    8    10        CONCAT                                           ~8      !0, !1
         11        ASSIGN                                                   !0, ~8
   10    12        INIT_FCALL                                               'printf'
         13        SEND_VAL                                                 '%25f%0A'
         14        INIT_FCALL                                               'microtime'
         15        SEND_VAL                                                 1
         16        DO_ICALL                                         $10     
         17        SUB                                              ~11     $10, !2
         18        SEND_VAL                                                 ~11
         19        DO_ICALL                                                 
   13    20        INIT_FCALL                                               'str_repeat'
         21        SEND_VAL                                                 'foo'
         22        SEND_VAL                                                 500000
         23        DO_ICALL                                         $13     
         24        ASSIGN                                                   !0, $13
   14    25        ASSIGN                                                   !1, 'bar'
   16    26        INIT_FCALL                                               'microtime'
         27        SEND_VAL                                                 1
         28        DO_ICALL                                         $16     
         29        ASSIGN                                                   !2, $16
   18    30        ASSIGN_OP                                     8          !0, !1
   20    31        INIT_FCALL                                               'printf'
         32        SEND_VAL                                                 '%25f%0A'
         33        INIT_FCALL                                               'microtime'
         34        SEND_VAL                                                 1
         35        DO_ICALL                                         $19     
         36        SUB                                              ~20     $19, !2
         37        SEND_VAL                                                 ~20
         38        DO_ICALL                                                 
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.58 ms | 1396 KiB | 19 Q