3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function test(array $p = []) { print_r($p); return null; } } $a = new A; $b = 'test'; $a->$b([ 'firstName' => 'Nikita', 'secondName' => 'Gopkalo', ]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p1HTb
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        ASSIGN                                                   !1, 'test'
   12     4        INIT_METHOD_CALL                                         !0, !1
   13     5        SEND_VAL_EX                                              <array>
          6        DO_FCALL                                      0          
   15     7      > RETURN                                                   1

Class A:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p1HTb
function name:  test
number of ops:  6
compiled vars:  !0 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      <array>
    4     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4      > RETURN                                                   null
    6     5*     > RETURN                                                   null

End of function test

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.82 ms | 1394 KiB | 15 Q