3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { const WEB_NAME = 'web name'; public function __invoke() { $templateName = 'web'; $templateName = strtoupper($templateName) . '_NAME'; $templateName = self::$templateName; echo $templateName; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7MelL
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   1

Class Foo:
Function __invoke:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7MelL
function name:  __invoke
number of ops:  10
compiled vars:  !0 = $templateName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'web'
   10     1        INIT_FCALL                                               'strtoupper'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $2      
          4        CONCAT                                           ~3      $2, '_NAME'
          5        ASSIGN                                                   !0, ~3
   11     6        FETCH_STATIC_PROP_R          global lock         ~5      'templateName'
          7        ASSIGN                                                   !0, ~5
   13     8        ECHO                                                     !0
   14     9      > RETURN                                                   null

End of function __invoke

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.46 ms | 1394 KiB | 15 Q