3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: text/html; charset=cp437'); echo sprintf("%'─7s", "ABC").PHP_EOL; $e = iconv('UTF-8', 'cp437', '─'); echo sprintf("%'%s7s", $e, "ABC"); // GOOD
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HApnQ
function name:  (null)
number of ops:  22
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-Type%3A+text%2Fhtml%3B+charset%3Dcp437'
          2        DO_ICALL                                                 
    3     3        INIT_FCALL                                               'sprintf'
          4        SEND_VAL                                                 '%25%27%E2%94%807s'
          5        SEND_VAL                                                 'ABC'
          6        DO_ICALL                                         $2      
          7        CONCAT                                           ~3      $2, '%0A'
          8        ECHO                                                     ~3
    4     9        INIT_FCALL_BY_NAME                                       'iconv'
         10        SEND_VAL_EX                                              'UTF-8'
         11        SEND_VAL_EX                                              'cp437'
         12        SEND_VAL_EX                                              '%E2%94%80'
         13        DO_FCALL                                      0  $4      
         14        ASSIGN                                                   !0, $4
    5    15        INIT_FCALL                                               'sprintf'
         16        SEND_VAL                                                 '%25%27%25s7s'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 'ABC'
         19        DO_ICALL                                         $6      
         20        ECHO                                                     $6
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.4 ms | 1011 KiB | 15 Q