3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=123; $s="$a"; if(is_numeric($s)==1) die("numerico"); echo "strlen=".strlen($s); for($i=0;$i<strlen($s);$i++) if(is_numeric($s[$i])) echo $s[$i]." in posizione $i"; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 14
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 14
Branch analysis from position: 28
Branch analysis from position: 14
Branch analysis from position: 24
filename:       /in/Z3ENh
function name:  (null)
number of ops:  29
compiled vars:  !0 = $a, !1 = $s, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 123
    3     1        CAST                                          6  ~4      !0
          2        ASSIGN                                                   !1, ~4
    4     3        INIT_FCALL                                               'is_numeric'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        IS_EQUAL                                                 $6, 1
          7      > JMPZ                                                     ~7, ->9
    5     8    > > EXIT                                                     'numerico'
    6     9    >   STRLEN                                           ~8      !1
         10        CONCAT                                           ~9      'strlen%3D', ~8
         11        ECHO                                                     ~9
    7    12        ASSIGN                                                   !2, 0
         13      > JMP                                                      ->25
    8    14    >   INIT_FCALL                                               'is_numeric'
         15        FETCH_DIM_R                                      ~11     !1, !2
         16        SEND_VAL                                                 ~11
         17        DO_ICALL                                         $12     
         18      > JMPZ                                                     $12, ->24
    9    19    >   FETCH_DIM_R                                      ~13     !1, !2
         20        NOP                                                      
         21        FAST_CONCAT                                      ~14     '+in+posizione+', !2
         22        CONCAT                                           ~15     ~13, ~14
         23        ECHO                                                     ~15
    7    24    >   PRE_INC                                                  !2
         25    >   STRLEN                                           ~17     !1
         26        IS_SMALLER                                               !2, ~17
         27      > JMPNZ                                                    ~18, ->14
   13    28    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.62 ms | 1396 KiB | 15 Q