3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* More complex example, with variables. */ class foo { public $foo; public $bar; function __construct() { $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/COblD
function name:  (null)
number of ops:  6
compiled vars:  !0 = $foo, !1 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        ASSIGN                                                   !1, 'MyName'
   20     4        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'
   24     5      > RETURN                                                   1

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

End of function __construct

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.21 ms | 1393 KiB | 13 Q