3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = array( 'a' => array() ); function f( &$a ) { try { throw new Exception(); } catch ( Exception $_ ) { } } f( $a['a'] ); $b = $a; $a['a'][] = 'a'; echo count( $a['a'] ) . '/' . count( $b['a'] ) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZCt18
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   12     1        INIT_FCALL                                                   'f'
          2        FETCH_DIM_W                                          $3      !0, 'a'
          3        SEND_REF                                                     $3
          4        DO_FCALL                                          0          
   14     5        ASSIGN                                                       !1, !0
   16     6        FETCH_DIM_W                                          $6      !0, 'a'
          7        ASSIGN_DIM                                                   $6
          8        OP_DATA                                                      'a'
   18     9        FETCH_DIM_R                                          ~8      !0, 'a'
         10        COUNT                                                ~9      ~8
         11        CONCAT                                               ~10     ~9, '%2F'
         12        FETCH_DIM_R                                          ~11     !1, 'a'
         13        COUNT                                                ~12     ~11
         14        CONCAT                                               ~13     ~10, ~12
         15        CONCAT                                               ~14     ~13, '%0A'
         16        ECHO                                                         ~14
         17      > RETURN                                                       1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZCt18
function name:  f
number of ops:  7
compiled vars:  !0 = $a, !1 = $_
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    7     1        NEW                                                  $2      'Exception'
          2        DO_FCALL                                          0          
          3      > THROW                                             0          $2
          4*       JMP                                                          ->6
    8     5  E > > CATCH                                           last         'Exception'
   10     6    > > RETURN                                                       null

End of function f

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.39 ms | 3362 KiB | 14 Q