3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.03 ms | 1395 KiB | 15 Q