3v4l.org

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

Function zerofill:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/8tb3W
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        CAST                                          4  ~3      !1
         3        CONCAT                                           ~4      '%250', ~3
         4        CONCAT                                           ~5      ~4, 's'
         5        ASSIGN                                                   !2, ~5
   6     6        INIT_FCALL                                               'sprintf'
         7        SEND_VAR                                                 !2
         8        SEND_VAR                                                 !0
         9        DO_ICALL                                         $7      
        10      > RETURN                                                   $7
   7    11*     > RETURN                                                   null

End of function zerofill

Generated using Vulcan Logic Dumper, using php 7.2.0