3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154 ms | 1396 KiB | 17 Q