3v4l.org

run code in 500+ PHP versions simultaneously
<?php class W {} class X extends W {} $x = new X; $f = function () { return parent::class; }; print $f->call($x); //function foo(parent $p) { return $this; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QWeN7
function name:  (null)
number of ops:  10
compiled vars:  !0 = $x, !1 = $f
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   NEW                                                  $2      'X'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
    7     3        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
          4        ASSIGN                                                       !1, ~5
    8     5        INIT_METHOD_CALL                                             !1, 'call'
          6        SEND_VAR_EX                                                  !0
          7        DO_FCALL                                          0  $7      
          8        ECHO                                                         $7
   12     9      > 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/QWeN7
function name:  {closure:/in/QWeN7:7}
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   FETCH_CLASS_NAME                                     ~0      
          1      > RETURN                                                       ~0
          2*     > RETURN                                                       null

End of Dynamic Function 0

Class W: [no user functions]
Class X: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
130.51 ms | 1461 KiB | 13 Q