3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function test(){return function(){ echo 'coin';};} }; $part = 'Test'; $vare = 'part'; $i = new $$vare(); $i->test()();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sVWTj
function name:  (null)
number of ops:  12
compiled vars:  !0 = $part, !1 = $vare, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'Test'
    6     1        ASSIGN                                                   !1, 'part'
    7     2        FETCH_R                      local               ~5      !1
          3        FETCH_CLASS                                   0  $6      ~5
          4        NEW                                              $7      $6
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !2, $7
    8     7        INIT_METHOD_CALL                                         !2, 'test'
          8        DO_FCALL                                      0  $10     
          9        INIT_DYNAMIC_CALL                                        $10
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FsVWTj%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sVWTj
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'coin'
          1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FsVWTj%3A3%240

Class Test:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sVWTj
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FsVWTj%3A3%240'
          1      > RETURN                                                   ~0
          2*     > RETURN                                                   null

End of function test

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.34 ms | 1385 KiB | 13 Q