3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = new StdClass(); $t->v = 3; $c = function() use ($t) { echo $t->v; }; $t->v = 5; $t = 6; $c();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nCMfW
function name:  (null)
number of ops:  14
compiled vars:  !0 = $t, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    3     3        ASSIGN_OBJ                                               !0, 'v'
          4        OP_DATA                                                  3
    4     5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FnCMfW%3A4%240'
          6        BIND_LEXICAL                                             ~6, !0
          7        ASSIGN                                                   !1, ~6
    8     8        ASSIGN_OBJ                                               !0, 'v'
          9        OP_DATA                                                  5
    9    10        ASSIGN                                                   !0, 6
   10    11        INIT_DYNAMIC_CALL                                        !1
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FnCMfW%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nCMfW
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_STATIC                                              !0
    5     1        FETCH_OBJ_R                                      ~1      !0, 'v'
          2        ECHO                                                     ~1
    6     3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FnCMfW%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.95 ms | 1394 KiB | 13 Q