3v4l.org

run code in 300+ PHP versions simultaneously
<?php $block = '25*'; $pos = strpos($block, '*'); if ($pos !== false) { $num = substr($block, 0, $pos); } $fullnum = str_pad($num,'0',3); echo $fullnum;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/aD1ok
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        TYPE_CHECK                                  1018          !1
          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
    8    14    >   INIT_FCALL                                               'str_pad'
         15        SEND_VAR                                                 !2
         16        SEND_VAL                                                 '0'
         17        SEND_VAL                                                 3
         18        DO_ICALL                                         $10     
         19        ASSIGN                                                   !3, $10
    9    20        ECHO                                                     !3
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.94 ms | 1395 KiB | 19 Q