3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<'EOD' Example of string spanning multiple lines using nowdoc syntax. EOD; /* More complex example, with variables. */ class foo { public $foo; public $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 not print a capital 'A': \x41 EOT; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qN8SE
function name:  (null)
number of ops:  7
compiled vars:  !0 = $str, !1 = $foo, !2 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Example+of+string%0Aspanning+multiple+lines%0Ausing+nowdoc+syntax.'
   21     1        NEW                                              $4      'foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
   22     4        ASSIGN                                                   !2, 'MyName'
   25     5        ECHO                                                     'My+name+is+%22%24name%22.+I+am+printing+some+%24foo-%3Efoo.%0ANow%2C+I+am+printing+some+%7B%24foo-%3Ebar%5B1%5D%7D.%0AThis+should+not+print+a+capital+%27A%27%3A+%5Cx41'
   29     6      > RETURN                                                   1

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

End of function foo

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.64 ms | 1393 KiB | 13 Q