3v4l.org

run code in 300+ PHP versions simultaneously
<?php function zerofill($mStretch, $iLength = 2) { $sPrintfString = '%s%0' . $iLength . 'b'; return sprintf($sPrintfString, $mStretch, 0b0); } var_dump(zerofill("asd", 10));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C0b9O
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'zerofill'
          2        SEND_VAL                                                 'asd'
          3        SEND_VAL                                                 10
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function zerofill:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C0b9O
function name:  zerofill
number of ops:  12
compiled vars:  !0 = $mStretch, !1 = $iLength, !2 = $sPrintfString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      2
    5     2        CONCAT                                           ~3      '%25s%250', !1
          3        CONCAT                                           ~4      ~3, 'b'
          4        ASSIGN                                                   !2, ~4
    6     5        INIT_FCALL                                               'sprintf'
          6        SEND_VAR                                                 !2
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 0
          9        DO_ICALL                                         $6      
         10      > RETURN                                                   $6
    7    11*     > RETURN                                                   null

End of function zerofill

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.51 ms | 1397 KiB | 18 Q