3v4l.org

run code in 300+ PHP versions simultaneously
<?php $block = '*'; $pos = strpos($block, '*'); if ($pos !== false) { $num = substr($block, 0, $pos); } $min = str_pad($num,3,'0') + 0; $max = min(255,str_pad($num,3,'9')); echo $min.'-'.$max;
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/ZMYjk
function name:  (null)
number of ops:  35
compiled vars:  !0 = $block, !1 = $pos, !2 = $num, !3 = $min, !4 = $max
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2A'
    3     1        INIT_FCALL                                               'strpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%2A'
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    4     6        TYPE_CHECK                                  1018          !1
          7      > JMPZ                                                     ~8, ->14
    5     8    >   INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 0
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !2, $9
    8    14    >   INIT_FCALL                                               'str_pad'
         15        SEND_VAR                                                 !2
         16        SEND_VAL                                                 3
         17        SEND_VAL                                                 '0'
         18        DO_ICALL                                         $11     
         19        ADD                                              ~12     $11, 0
         20        ASSIGN                                                   !3, ~12
   10    21        INIT_FCALL                                               'min'
         22        SEND_VAL                                                 255
         23        INIT_FCALL                                               'str_pad'
         24        SEND_VAR                                                 !2
         25        SEND_VAL                                                 3
         26        SEND_VAL                                                 '9'
         27        DO_ICALL                                         $14     
         28        SEND_VAR                                                 $14
         29        DO_ICALL                                         $15     
         30        ASSIGN                                                   !4, $15
   11    31        CONCAT                                           ~17     !3, '-'
         32        CONCAT                                           ~18     ~17, !4
         33        ECHO                                                     ~18
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.02 ms | 1388 KiB | 21 Q