3v4l.org

run code in 300+ PHP versions simultaneously
<?php class config { const AA = "test"; public static $Image="/images"; } class layout { public $name = "NAME!"; public function writeLogo() { $text = <<<ABC <img class="Logo" title="My Logo" alt="Logo" src="{config::AA}/Logo.gif" /> <img class="Logo" title="My Logo" alt="Logo" src="{config::$Image}/Logo.gif" /> <img class="Logo" title="My Logo" alt="Logo" src="{$this->name}/Logo.gif" /> ABC; echo($text); } } $sample = new layout(); $sample->writeLogo(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9IOLN
function name:  (null)
number of ops:  6
compiled vars:  !0 = $sample
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'layout'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'writeLogo'
          4        DO_FCALL                                      0          
   25     5      > RETURN                                                   1

Class config: [no user functions]
Class layout:
Function writelogo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9IOLN
function name:  writeLogo
number of ops:  9
compiled vars:  !0 = $text, !1 = $Image
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ROPE_INIT                                     5  ~4      '++++++++++++%3Cimg+class%3D%22Logo%22+title%3D%22My+Logo%22+alt%3D%22Logo%22+src%3D%22%7Bconfig%3A%3AAA%7D%2FLogo.gif%22+%2F%3E%0A++++++++++++%3Cimg+class%3D%22Logo%22+title%3D%22My+Logo%22+alt%3D%22Logo%22+src%3D%22%7Bconfig%3A%3A'
   15     1        ROPE_ADD                                      1  ~4      ~4, !1
          2        ROPE_ADD                                      2  ~4      ~4, '%7D%2FLogo.gif%22+%2F%3E%0A++++++++++++%3Cimg+class%3D%22Logo%22+title%3D%22My+Logo%22+alt%3D%22Logo%22+src%3D%22'
   16     3        FETCH_OBJ_R                                      ~2      'name'
          4        ROPE_ADD                                      3  ~4      ~4, ~2
          5        ROPE_END                                      4  ~3      ~4, '%2FLogo.gif%22+%2F%3E'
   13     6        ASSIGN                                                   !0, ~3
   19     7        ECHO                                                     !0
   20     8      > RETURN                                                   null

End of function writelogo

End of class layout.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.31 ms | 1394 KiB | 13 Q