3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { function Test() { $spec['validator'] = 'fn'; echo self::$spec['validator']($bank); } function fn() { return 'def'; } } $c = new C; $c->Test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OFrqg
function name:  (null)
number of ops:  6
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'C'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   10     3        INIT_METHOD_CALL                                         !0, 'Test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class C:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OFrqg
function name:  Test
number of ops:  9
compiled vars:  !0 = $spec, !1 = $bank
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN_DIM                                               !0, 'validator'
          1        OP_DATA                                                  'fn'
    5     2        FETCH_STATIC_PROP_R          unknown             ~3      'spec'
          3        FETCH_DIM_R                                      ~4      ~3, 'validator'
          4        INIT_DYNAMIC_CALL                                        ~4
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $5      
          7        ECHO                                                     $5
    6     8      > RETURN                                                   null

End of function test

Function fn:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OFrqg
function name:  fn
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'def'
          1*     > RETURN                                                   null

End of function fn

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.8 ms | 1394 KiB | 13 Q