3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace MyProject { const CONNECT_OK = 1; class Connection { public function foo() { echo 'hello' . "\n"; } } function connect() { /* ... */ } } namespace { // código global $a = MyProject\connect(); $b = new MyProject\Connection(); $b->foo(); echo MyProject\CONNECT_OK . "\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AOeAf
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CONST                                            'MyProject%5CCONNECT_OK', 1
   15     1        INIT_FCALL                                               'myproject%5Cconnect'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
   16     4        NEW                                              $4      'MyProject%5CConnection'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $4
   17     7        INIT_METHOD_CALL                                         !1, 'foo'
          8        DO_FCALL                                      0          
   18     9        FETCH_CONSTANT                                   ~8      'MyProject%5CCONNECT_OK'
         10        CONCAT                                           ~9      ~8, '%0A'
         11        ECHO                                                     ~9
   19    12      > RETURN                                                   1

Function myproject%5Cconnect:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AOeAf
function name:  MyProject\connect
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   null

End of function myproject%5Cconnect

Class MyProject\Connection:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AOeAf
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'hello%0A'
    9     1      > RETURN                                                   null

End of function foo

End of class MyProject\Connection.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.03 ms | 1398 KiB | 14 Q