3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); $a = [1233=>true]; /** * @param array<int, bool> $a */ function a(array $a): void { $l = (string) array_key_last($a); !function_exists('\PHPStan\dumpType')?:\PHPStan\dumpType($l); $s = substr($l, 0, 2); !function_exists('\PHPStan\dumpType')?:\PHPStan\dumpType($s); if ($s === '') { ; } else { var_dump($s); } } a($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IUeMD
function name:  (null)
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   19     1        INIT_FCALL                                               'a'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function a:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 35
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IUeMD
function name:  a
number of ops:  39
compiled vars:  !0 = $a, !1 = $l, !2 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'array_key_last'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        CAST                                          6  ~4      $3
          5        ASSIGN                                                   !1, ~4
    9     6        INIT_FCALL                                               'function_exists'
          7        SEND_VAL                                                 '%5CPHPStan%5CdumpType'
          8        DO_ICALL                                         $6      
          9        BOOL_NOT                                         ~7      $6
         10        JMP_SET                                          ~8      ~7, ->15
         11        INIT_FCALL_BY_NAME                                       'PHPStan%5CdumpType'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0  $9      
         14        QM_ASSIGN                                        ~8      $9
         15        FREE                                                     ~8
   10    16        INIT_FCALL                                               'substr'
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 0
         19        SEND_VAL                                                 2
         20        DO_ICALL                                         $10     
         21        ASSIGN                                                   !2, $10
   11    22        INIT_FCALL                                               'function_exists'
         23        SEND_VAL                                                 '%5CPHPStan%5CdumpType'
         24        DO_ICALL                                         $12     
         25        BOOL_NOT                                         ~13     $12
         26        JMP_SET                                          ~14     ~13, ->31
         27        INIT_FCALL_BY_NAME                                       'PHPStan%5CdumpType'
         28        SEND_VAR_EX                                              !2
         29        DO_FCALL                                      0  $15     
         30        QM_ASSIGN                                        ~14     $15
         31        FREE                                                     ~14
   12    32        IS_IDENTICAL                                             !2, ''
         33      > JMPZ                                                     ~16, ->35
         34    > > JMP                                                      ->38
   15    35    >   INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !2
         37        DO_ICALL                                                 
   17    38    > > RETURN                                                   null

End of function a

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.51 ms | 1098 KiB | 18 Q