3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = 'test'; $line = "var1: %2$s, var2: %s"; echo sprintf($line, $arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Uh8qc
function name:  (null)
number of ops:  11
compiled vars:  !0 = $arr, !1 = $line, !2 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test'
    3     1        ROPE_INIT                                     3  ~5      'var1%3A+%252'
          2        ROPE_ADD                                      1  ~5      ~5, !2
          3        ROPE_END                                      2  ~4      ~5, '%2C+var2%3A+%25s'
          4        ASSIGN                                                   !1, ~4
    4     5        INIT_FCALL                                               'sprintf'
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $8      
          9        ECHO                                                     $8
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150 ms | 1394 KiB | 15 Q