3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $c = "Secret"; } $a = function () { echo $this->c."\n"; $this->c = "new Secret"; echo $this->c; }; $a = $a->bindTo($a,"A"); $a();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BGnQ6
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FBGnQ6%3A7%240'
          1        ASSIGN                                                   !0, ~1
   13     2        INIT_METHOD_CALL                                         !0, 'bindTo'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAL_EX                                              'A'
          5        DO_FCALL                                      0  $3      
          6        ASSIGN                                                   !0, $3
   14     7        INIT_DYNAMIC_CALL                                        !0
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FBGnQ6%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BGnQ6
function name:  {closure}
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_THIS                                       $0      
          1        FETCH_OBJ_R                                      ~1      $0, 'c'
          2        CONCAT                                           ~2      ~1, '%0A'
          3        ECHO                                                     ~2
    9     4        FETCH_THIS                                       $3      
          5        ASSIGN_OBJ                                               $3, 'c'
          6        OP_DATA                                                  'new+Secret'
   10     7        FETCH_THIS                                       $5      
          8        FETCH_OBJ_R                                      ~6      $5, 'c'
          9        ECHO                                                     ~6
   11    10      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBGnQ6%3A7%240

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.44 ms | 1385 KiB | 13 Q