3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str1 = 'Hello'; $str2 = 'Hello world!'; echo sprintf("[%s]",$str1)."<br>"; // String echo sprintf("[%8s]",$str1)."<br>"; // Right-justifies the string with spaces echo sprintf("[%-8s]",$str1)."<br>"; // Left-justifies the string with spaces echo sprintf("[%08s]",$str1)."<br>"; // Zero-padding echo sprintf("[%'*8s]",$str1)."<br>"; // Adds "*" echo sprintf("[%8.8s]",$str2)."<br>"; // Left-justifies the string with spaces (cuts off characters after the specified value)
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rr0RA
function name:  (null)
number of ops:  39
compiled vars:  !0 = $str1, !1 = $str2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Hello'
    3     1        ASSIGN                                                   !1, 'Hello+world%21'
    5     2        INIT_FCALL                                               'sprintf'
          3        SEND_VAL                                                 '%5B%25s%5D'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        CONCAT                                           ~5      $4, '%3Cbr%3E'
          7        ECHO                                                     ~5
    6     8        INIT_FCALL                                               'sprintf'
          9        SEND_VAL                                                 '%5B%258s%5D'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $6      
         12        CONCAT                                           ~7      $6, '%3Cbr%3E'
         13        ECHO                                                     ~7
    7    14        INIT_FCALL                                               'sprintf'
         15        SEND_VAL                                                 '%5B%25-8s%5D'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $8      
         18        CONCAT                                           ~9      $8, '%3Cbr%3E'
         19        ECHO                                                     ~9
    8    20        INIT_FCALL                                               'sprintf'
         21        SEND_VAL                                                 '%5B%2508s%5D'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $10     
         24        CONCAT                                           ~11     $10, '%3Cbr%3E'
         25        ECHO                                                     ~11
    9    26        INIT_FCALL                                               'sprintf'
         27        SEND_VAL                                                 '%5B%25%27%2A8s%5D'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $12     
         30        CONCAT                                           ~13     $12, '%3Cbr%3E'
         31        ECHO                                                     ~13
   10    32        INIT_FCALL                                               'sprintf'
         33        SEND_VAL                                                 '%5B%258.8s%5D'
         34        SEND_VAR                                                 !1
         35        DO_ICALL                                         $14     
         36        CONCAT                                           ~15     $14, '%3Cbr%3E'
         37        ECHO                                                     ~15
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.06 ms | 1396 KiB | 15 Q