3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $block = '25*'; $pos = strpos($block, '*'); if ($pos !== false) { $num = substr($block, 0, $pos); } echo $num; $fullnum = strpad($block,'0',3);
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
Jump found. Position 1 = -2
Branch analysis from position: 14
filename:       /in/nfgDS
function name:  (null)
number of ops:  22
compiled vars:  !0 = $block, !1 = $pos, !2 = $num, !3 = $fullnum
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, '25%2A'
   3     1        INIT_FCALL                                               'strpos'
         2        SEND_VAR                                                 !0
         3        SEND_VAL                                                 '%2A'
         4        DO_ICALL                                         $5      
         5        ASSIGN                                                   !1, $5
   4     6        IS_NOT_IDENTICAL                                 ~7      !1, <false>
         7      > JMPZ                                                     ~7, ->14
   5     8    >   INIT_FCALL                                               'substr'
         9        SEND_VAR                                                 !0
        10        SEND_VAL                                                 0
        11        SEND_VAR                                                 !1
        12        DO_ICALL                                         $8      
        13        ASSIGN                                                   !2, $8
   7    14    >   ECHO                                                     !2
   9    15        INIT_FCALL_BY_NAME                                       'strpad'
        16        SEND_VAR_EX                                              !0
        17        SEND_VAL_EX                                              '0'
        18        SEND_VAL_EX                                              3
        19        DO_FCALL                                      0  $10     
        20        ASSIGN                                                   !3, $10
        21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0