3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CTroll { public function hardTrolling(){echo "in hard trolling";} public function softTrolling(){echo "in soft trolling";} } $randomTroll = new CTroll(); $powerLevel = "hard"; $appended = $powerLevel . "Trolling"; $randomTroll->{$powerLevel . 'Trolling'}();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tKeRo
function name:  (null)
number of ops:  10
compiled vars:  !0 = $randomTroll, !1 = $powerLevel, !2 = $appended
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'CTroll'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   10     3        ASSIGN                                                   !1, 'hard'
   12     4        CONCAT                                           ~7      !1, 'Trolling'
          5        ASSIGN                                                   !2, ~7
   13     6        CONCAT                                           ~9      !1, 'Trolling'
          7        INIT_METHOD_CALL                                         !0, ~9
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Class CTroll:
Function hardtrolling:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tKeRo
function name:  hardTrolling
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'in+hard+trolling'
          1      > RETURN                                                   null

End of function hardtrolling

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

End of function softtrolling

End of class CTroll.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.33 ms | 1394 KiB | 13 Q