3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($v) { if (!is_numeric($v)) { throw new InvalidArgumentException( sprintf( "Argument 1 passed to %s() must be a valid number, %s given in %s on line %d", __FUNCTION__, gettype($v), __FILE__, __LINE__ ) ); } echo $v; } foo("9999999999999999999999999999999");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dt5kK
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'foo'
          1        SEND_VAL                                                 '9999999999999999999999999999999'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dt5kK
function name:  foo
number of ops:  20
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'is_numeric'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        BOOL_NOT                                         ~2      $1
          5      > JMPZ                                                     ~2, ->18
    4     6    >   NEW                                              $3      'InvalidArgumentException'
    5     7        INIT_FCALL                                               'sprintf'
    6     8        SEND_VAL                                                 'Argument+1+passed+to+%25s%28%29+must+be+a+valid+number%2C+%25s+given+in+%25s+on+line+%25d'
    7     9        SEND_VAL                                                 'foo'
    8    10        GET_TYPE                                         ~4      !0
         11        SEND_VAL                                                 ~4
    9    12        SEND_VAL                                                 '%2Fin%2Fdt5kK'
   11    13        SEND_VAL                                                 11
         14        DO_ICALL                                         $5      
         15        SEND_VAR_NO_REF_EX                                       $5
         16        DO_FCALL                                      0          
         17      > THROW                                         0          $3
   14    18    >   ECHO                                                     !0
   15    19      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.94 ms | 1398 KiB | 18 Q