3v4l.org

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

Function ad:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9BBId
function name:  ad
number of ops:  12
compiled vars:  !0 = $a, !1 = $ar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      ''
    4     1        BIND_GLOBAL                                              !1, 'ar'
    5     2        TYPE_CHECK                                   16          !0
          3      > JMPZ                                                     ~2, ->8
    6     4    >   CONCAT                                           ~4      !0, 'int'
          5        ASSIGN_DIM                                               !1
          6        OP_DATA                                                  ~4
          7      > JMP                                                      ->11
    8     8    >   CONCAT                                           ~6      !0, 'not'
          9        ASSIGN_DIM                                               !1
         10        OP_DATA                                                  ~6
   10    11    > > RETURN                                                   null

End of function ad

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.61 ms | 1403 KiB | 21 Q