3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ad($a=''){ if(is_int($a)){ echo $a.'int\n'; }else{ echo $a.'not\n'; } } ad(); ad(2); ad('2'); ad(2.5); ad(0); ad(1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tW4GQ
function name:  (null)
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'ad'
          1        DO_FCALL                                      0          
   10     2        INIT_FCALL                                               'ad'
          3        SEND_VAL                                                 2
          4        DO_FCALL                                      0          
   11     5        INIT_FCALL                                               'ad'
          6        SEND_VAL                                                 '2'
          7        DO_FCALL                                      0          
   12     8        INIT_FCALL                                               'ad'
          9        SEND_VAL                                                 2.5
         10        DO_FCALL                                      0          
   13    11        INIT_FCALL                                               'ad'
         12        SEND_VAL                                                 0
         13        DO_FCALL                                      0          
   14    14        INIT_FCALL                                               'ad'
         15        SEND_VAL                                                 1
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

Function ad:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
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: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tW4GQ
function name:  ad
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      ''
    3     1        TYPE_CHECK                                   16          !0
          2      > JMPZ                                                     ~1, ->6
    4     3    >   CONCAT                                           ~2      !0, 'int%5Cn'
          4        ECHO                                                     ~2
          5      > JMP                                                      ->8
    6     6    >   CONCAT                                           ~3      !0, 'not%5Cn'
          7        ECHO                                                     ~3
    8     8    > > RETURN                                                   null

End of function ad

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.26 ms | 1398 KiB | 19 Q