3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ public function __call($n,$a){ return $this->$n->call($this,$a); } } $f=new Foo(); $f->b=function($x){echo$x;}; var_dump($f->b(7));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XTKSc
function name:  (null)
number of ops:  13
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    9     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FXTKSc%3A9%240'
          4        ASSIGN_OBJ                                               !0, 'b'
          5        OP_DATA                                                  ~5
   11     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !0, 'b'
          8        SEND_VAL_EX                                              7
          9        DO_FCALL                                      0  $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FXTKSc%3A9%240

Class Foo:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XTKSc
function name:  __call
number of ops:  10
compiled vars:  !0 = $n, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        FETCH_OBJ_R                                      ~2      !0
          3        INIT_METHOD_CALL                                         ~2, 'call'
          4        FETCH_THIS                                       $3      
          5        SEND_VAR_EX                                              $3
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $4      
          8      > RETURN                                                   $4
    6     9*     > RETURN                                                   null

End of function __call

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.07 ms | 941 KiB | 16 Q