3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.86 ms | 1396 KiB | 17 Q