3v4l.org

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

Function is_intstr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8Hmur
function name:  is_intstr
number of ops:  7
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%280%7C%5B1-9%5D%5B0-9%5D%2A%29%24%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
    5     6*     > RETURN                                                   null

End of function is_intstr

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.34 ms | 1399 KiB | 18 Q