3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace MyProject { const CONNECT_OK = 1; class Connection { static public function start() { echo 'started'; } } function connect() { /* ... */ } } namespace { // global code session_start(); $a = MyProject\connect(); echo MyProject\Connection::start(); echo phpversion(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mfob7
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   DECLARE_CONST                                            'MyProject%5CCONNECT_OK', 1
  11     1        INIT_FCALL                                               'session_start'
         2        DO_ICALL                                                 
  12     3        INIT_FCALL                                               'myproject%5Cconnect'
         4        DO_FCALL                                      0  $2      
         5        QM_ASSIGN                                                !0
  13     6        INIT_STATIC_METHOD_CALL                                  'MyProject%5CConnection', 'start'
         7        DO_FCALL                                      0  $4      
         8        ASSIGN_OBJ                                               $4
  14     9        INIT_FCALL                                               'phpversion'
        10        DO_ICALL                                         $5      
        11        ASSIGN_OBJ                                               $5
  15    12      > RETURN                                                   1

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

End of function myproject%5Cconnect

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

End of function start

End of class MyProject\Connection.

Generated using Vulcan Logic Dumper, using php 7.4.0