3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_intstr($val, $negative=false) { return preg_match("/^".($negative?"-?":"")."(0|[1-9][0-9]*)$/", $val); } foreach(range(-10, 20) as $n) { echo $n*$n*$n; echo " - "; echo is_intstr($n*$n*$n, true); echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/SEmKg
function name:  (null)
number of ops:  21
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 -10
          2        SEND_VAL                                                 20
          3        DO_ICALL                                         $1      
          4      > FE_RESET_R                                       $2      $1, ->19
          5    > > FE_FETCH_R                                               $2, !0, ->19
    7     6    >   MUL                                              ~3      !0, !0
          7        MUL                                              ~4      !0, ~3
          8        ECHO                                                     ~4
    8     9        ECHO                                                     '+-+'
    9    10        INIT_FCALL                                               'is_intstr'
         11        MUL                                              ~5      !0, !0
         12        MUL                                              ~6      !0, ~5
         13        SEND_VAL                                                 ~6
         14        SEND_VAL                                                 <true>
         15        DO_FCALL                                      0  $7      
         16        ECHO                                                     $7
   10    17        ECHO                                                     '%0A'
    6    18      > JMP                                                      ->5
         19    >   FE_FREE                                                  $2
   11    20      > RETURN                                                   1

Function is_intstr:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SEmKg
function name:  is_intstr
number of ops:  14
compiled vars:  !0 = $val, !1 = $negative
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
    4     2        INIT_FCALL                                               'preg_match'
          3      > JMPZ                                                     !1, ->6
          4    >   QM_ASSIGN                                        ~2      '-%3F'
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~2      ''
          7    >   CONCAT                                           ~3      '%2F%5E', ~2
          8        CONCAT                                           ~4      ~3, '%280%7C%5B1-9%5D%5B0-9%5D%2A%29%24%2F'
          9        SEND_VAL                                                 ~4
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $5      
         12      > RETURN                                                   $5
    5    13*     > RETURN                                                   null

End of function is_intstr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.45 ms | 1394 KiB | 18 Q