3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A{ public function __invoke($arg){ echo __METHOD__ . "($arg) called" . PHP_EOL; } } $a = new A(); $a(0); $a(1)(2)(3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6YlOq
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   NEW                                                  $1      'A'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   10     3        INIT_DYNAMIC_CALL                                            !0
          4        SEND_VAL_EX                                                  0
          5        DO_FCALL                                          0          
   11     6        INIT_DYNAMIC_CALL                                            !0
          7        SEND_VAL_EX                                                  1
          8        DO_FCALL                                          0  $5      
          9        INIT_DYNAMIC_CALL                                            $5
         10        SEND_VAL_EX                                                  2
         11        DO_FCALL                                          0  $6      
         12        INIT_DYNAMIC_CALL                                            $6
         13        SEND_VAL_EX                                                  3
         14        DO_FCALL                                          0          
         15      > RETURN                                                       1

Class A:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6YlOq
function name:  __invoke
number of ops:  8
compiled vars:  !0 = $arg
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
    5     1        ROPE_INIT                                         3  ~2      '%28'
          2        ROPE_ADD                                          1  ~2      ~2, !0
          3        ROPE_END                                          2  ~1      ~2, '%29+called'
          4        CONCAT                                               ~4      'A%3A%3A__invoke', ~1
          5        CONCAT                                               ~5      ~4, '%0A'
          6        ECHO                                                         ~5
    6     7      > RETURN                                                       null

End of function __invoke

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
178.95 ms | 2275 KiB | 13 Q