3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = [ 'foo' => 'bar', ]; function thr(Throwable $exp) { throw $exp; } $b = $a['foo'] ?? thr(new Exception()); $c = $a['ddd'] ?? thr(new Exception()); $d = false ? true : thr(new Exception());
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fJlEI
function name:  (null)
number of ops:  30
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   11     1        FETCH_DIM_IS                                         ~5      !0, 'foo'
          2        COALESCE                                             ~6      ~5
          3        INIT_FCALL                                                   'thr'
          4        NEW                                                  $7      'Exception'
          5        DO_FCALL                                          0          
          6        SEND_VAR                                                     $7
          7        DO_FCALL                                          0  $9      
          8        QM_ASSIGN                                            ~6      $9
          9        ASSIGN                                                       !1, ~6
   12    10        FETCH_DIM_IS                                         ~11     !0, 'ddd'
         11        COALESCE                                             ~12     ~11
         12        INIT_FCALL                                                   'thr'
         13        NEW                                                  $13     'Exception'
         14        DO_FCALL                                          0          
         15        SEND_VAR                                                     $13
         16        DO_FCALL                                          0  $15     
         17        QM_ASSIGN                                            ~12     $15
         18        ASSIGN                                                       !2, ~12
   14    19      > JMPZ                                                         <false>, ->22
         20    >   QM_ASSIGN                                            ~17     <true>
         21      > JMP                                                          ->28
         22    >   INIT_FCALL                                                   'thr'
         23        NEW                                                  $18     'Exception'
         24        DO_FCALL                                          0          
         25        SEND_VAR                                                     $18
         26        DO_FCALL                                          0  $20     
         27        QM_ASSIGN                                            ~17     $20
         28    >   ASSIGN                                                       !3, ~17
         29      > RETURN                                                       1

Function thr:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/fJlEI
function name:  thr
number of ops:  3
compiled vars:  !0 = $exp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    8     1      > THROW                                             0          !0
    9     2*     > RETURN                                                       null

End of function thr

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.76 ms | 3343 KiB | 16 Q