3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Curious about the bytecode difference between comma-separated and period-concatenated echoes echo 'foo', 'bar', 'baz'; echo 'foo' . 'bar' . 'baz'; $bar = 'bar'; echo 'foo', $bar[rand(0,2)], 'baz';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1RAm2
function name:  (null)
number of ops:  14
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'foo'
          1        ECHO                                                     'bar'
          2        ECHO                                                     'baz'
    6     3        ECHO                                                     'foobarbaz'
    7     4        ASSIGN                                                   !0, 'bar'
    8     5        ECHO                                                     'foo'
          6        INIT_FCALL                                               'rand'
          7        SEND_VAL                                                 0
          8        SEND_VAL                                                 2
          9        DO_ICALL                                         $2      
         10        FETCH_DIM_R                                      ~3      !0, $2
         11        ECHO                                                     ~3
         12        ECHO                                                     'baz'
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.28 ms | 1394 KiB | 15 Q