3v4l.org

run code in 300+ PHP versions simultaneously
<?php class db { public $default; function __construct() { $default = array( 'host' => 'host s;pace', 'database' => 'd', 'login' => 'l'); } } $db = new db(); $p = 'password'; $str = <<<EODT DB_HOST="{$db->default['host']}" DB_NAME="{$db->default['database']}" DB_USER="{$db->default['login']}" DB_PASS={$p} EODT; echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tLuA4
function name:  (null)
number of ops:  21
compiled vars:  !0 = $db, !1 = $p, !2 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $3      'db'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
          3        ASSIGN                                                   !1, 'password'
   11     4        ROPE_INIT                                     8  ~14     '+DB_HOST%3D%22'
          5        FETCH_OBJ_R                                      ~7      !0, 'default'
          6        FETCH_DIM_R                                      ~8      ~7, 'host'
          7        ROPE_ADD                                      1  ~14     ~14, ~8
          8        ROPE_ADD                                      2  ~14     ~14, '%22%0A+DB_NAME%3D%22'
   12     9        FETCH_OBJ_R                                      ~9      !0, 'default'
         10        FETCH_DIM_R                                      ~10     ~9, 'database'
         11        ROPE_ADD                                      3  ~14     ~14, ~10
         12        ROPE_ADD                                      4  ~14     ~14, '%22%0A+DB_USER%3D%22'
   13    13        FETCH_OBJ_R                                      ~11     !0, 'default'
         14        FETCH_DIM_R                                      ~12     ~11, 'login'
         15        ROPE_ADD                                      5  ~14     ~14, ~12
         16        ROPE_ADD                                      6  ~14     ~14, '%22%0A+DB_PASS%3D'
   14    17        ROPE_END                                      7  ~13     ~14, !1
   10    18        ASSIGN                                                   !2, ~13
   17    19        ECHO                                                     !2
         20      > RETURN                                                   1

Class db:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tLuA4
function name:  __construct
number of ops:  2
compiled vars:  !0 = $default
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, <array>
          1      > RETURN                                                   null

End of function __construct

End of class db.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.78 ms | 1394 KiB | 13 Q