3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( '0x539', '02471', '1337e0', '0b10100111001', ); foreach ($tests as $element) { if (is_numeric($element)) { echo "'{$element}' is numeric", PHP_EOL; } else { echo "'{$element}' is NOT numeric", PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 19
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/vpHrs
function name:  (null)
number of ops:  21
compiled vars:  !0 = $tests, !1 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1      > FE_RESET_R                                       $3      !0, ->19
          2    > > FE_FETCH_R                                               $3, !1, ->19
   11     3    >   INIT_FCALL                                               'is_numeric'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $4      
          6      > JMPZ                                                     $4, ->13
   12     7    >   ROPE_INIT                                     3  ~6      '%27'
          8        ROPE_ADD                                      1  ~6      ~6, !1
          9        ROPE_END                                      2  ~5      ~6, '%27+is+numeric'
         10        ECHO                                                     ~5
         11        ECHO                                                     '%0A'
         12      > JMP                                                      ->18
   14    13    >   ROPE_INIT                                     3  ~9      '%27'
         14        ROPE_ADD                                      1  ~9      ~9, !1
         15        ROPE_END                                      2  ~8      ~9, '%27+is+NOT+numeric'
         16        ECHO                                                     ~8
         17        ECHO                                                     '%0A'
   10    18    > > JMP                                                      ->2
         19    >   FE_FREE                                                  $3
   16    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.5 ms | 1395 KiB | 15 Q