3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function numeric($value): void { if (is_numeric($value)) { echo 'numeric'; } else { echo 'not numeric'; } echo ': ', (int) $value; } numeric("\n\t\n 42"); echo ', '; numeric("1337 ");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WEi6L
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'numeric'
          1        SEND_VAL                                                 '%0A%09%0A+42'
          2        DO_FCALL                                      0          
   14     3        ECHO                                                     '%2C+'
   15     4        INIT_FCALL                                               'numeric'
          5        SEND_VAL                                                 '1337++'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function numeric:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WEi6L
function name:  numeric
number of ops:  12
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'is_numeric'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > JMPZ                                                     $1, ->7
    5     5    >   ECHO                                                     'numeric'
    4     6      > JMP                                                      ->8
    7     7    >   ECHO                                                     'not+numeric'
   10     8    >   ECHO                                                     '%3A+'
          9        CAST                                          4  ~2      !0
         10        ECHO                                                     ~2
   11    11      > RETURN                                                   null

End of function numeric

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.36 ms | 1013 KiB | 16 Q