3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.13 ms | 1396 KiB | 15 Q