3v4l.org

run code in 500+ PHP versions simultaneously
<?php $f = function () use (&$a) { $a = [1]; }; var_dump($a); $x = new class ($c) { function __construct(&$d) { $d = []; } }; var_dump($c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z5jgo
function name:  (null)
number of ops:  15
compiled vars:  !0 = $f, !1 = $a, !2 = $x, !3 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          1        BIND_LEXICAL                                                 ~4, !1
          2        ASSIGN                                                       !0, ~4
    4     3        INIT_FCALL                                                   'var_dump'
          4        SEND_VAR                                                     !1
          5        DO_ICALL                                                     
    6     6        DECLARE_ANON_CLASS                                   <unknown> 
          7        NEW                                                  $8      $7
          8        SEND_VAR_EX                                                  !3
          9        DO_FCALL                                          0          
         10        ASSIGN                                                       !2, $8
    7    11        INIT_FCALL                                                   'var_dump'
         12        SEND_VAR                                                     !3
         13        DO_ICALL                                                     
         14      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z5jgo
function name:  {closure:/in/Z5jgo:3}
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   BIND_STATIC                                                  !0
          1        ASSIGN                                                       !0, <array>
          2      > RETURN                                                       null

End of Dynamic Function 0

Class class@anonymous:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z5jgo
function name:  __construct
number of ops:  3
compiled vars:  !0 = $d
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        ASSIGN                                                       !0, <array>
          2      > RETURN                                                       null

End of function __construct

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.62 ms | 3340 KiB | 14 Q