3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.04 ms | 1386 KiB | 17 Q