3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<EOD Example of string spanning multiple lines using heredoc syntax. EOD; /* More complex example, with variables. */ class foo { var $foo; var $bar; function foo() { $this->foo = 'Foo'; $this->bar = array('Bar1', 'Bar2', 'Bar3'); } } $foo = new foo(); $name = 'MyName'; echo <<<EOT My name is "$name". I am printing some $foo->foo. Now, I am printing some {$foo->bar[1]}. This should print a capital 'A': \x41 EOT; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g96BI
function name:  (null)
number of ops:  17
compiled vars:  !0 = $str, !1 = $foo, !2 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'Example+of+string%0Aspanning+multiple+lines%0Ausing+heredoc+syntax.'
   23     1        NEW                                              $4      'foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   24     4        ASSIGN                                                   !2, 'MyName'
   27     5        ROPE_INIT                                     7  ~12     'My+name+is+%22'
          6        ROPE_ADD                                      1  ~12     ~12, !2
          7        ROPE_ADD                                      2  ~12     ~12, '%22.+I+am+printing+some+'
          8        FETCH_OBJ_R                                      ~8      !1, 'foo'
          9        ROPE_ADD                                      3  ~12     ~12, ~8
         10        ROPE_ADD                                      4  ~12     ~12, '.%0ANow%2C+I+am+printing+some+'
   28    11        FETCH_OBJ_R                                      ~9      !1, 'bar'
         12        FETCH_DIM_R                                      ~10     ~9, 1
         13        ROPE_ADD                                      5  ~12     ~12, ~10
         14        ROPE_END                                      6  ~11     ~12, '.%0AThis+should+print+a+capital+%27A%27%3A+A'
         15        ECHO                                                     ~11
   32    16      > RETURN                                                   1

Class foo:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g96BI
function name:  foo
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ASSIGN_OBJ                                               'foo'
          1        OP_DATA                                                  'Foo'
   19     2        ASSIGN_OBJ                                               'bar'
          3        OP_DATA                                                  <array>
   20     4      > RETURN                                                   null

End of function foo

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.11 ms | 1385 KiB | 13 Q