3v4l.org

run code in 300+ PHP versions simultaneously
<?php class version_info { private $vi = array(); // Version Information Array function __construct() { //$this->vi = array(); } function add($name, $filename, $doc = 0, $date, $ver) { $this->vi[$filename] = array( 'name' => $name, 'filename' => $filename, 'document' => $doc, // Include in automatic SiteCommander tech documentation 'version' => $ver, 'date' => $date ); } function dump() { // temporary for debugging print_r($this->vi); } } /* end of class version_info */ $sc_version_info = new version_info(); $sc_version_info->add('Test', '/admin/test2.php', 1, 2, 3); f('Test', '/admin/test.php', 4, 5, 6); $sc_version_info->dump(); function f($a, $b, $c, $d, $e) { global $sc_version_info; $sc_version_info->add($a, $b, $c, $d, $e); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2AZhb
function name:  (null)
number of ops:  20
compiled vars:  !0 = $sc_version_info
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'version_info'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_METHOD_CALL                                         !0, 'add'
          4        SEND_VAL_EX                                              'Test'
          5        SEND_VAL_EX                                              '%2Fadmin%2Ftest2.php'
          6        SEND_VAL_EX                                              1
          7        SEND_VAL_EX                                              2
          8        SEND_VAL_EX                                              3
          9        DO_FCALL                                      0          
   23    10        INIT_FCALL_BY_NAME                                       'f'
         11        SEND_VAL_EX                                              'Test'
         12        SEND_VAL_EX                                              '%2Fadmin%2Ftest.php'
         13        SEND_VAL_EX                                              4
         14        SEND_VAL_EX                                              5
         15        SEND_VAL_EX                                              6
         16        DO_FCALL                                      0          
   24    17        INIT_METHOD_CALL                                         !0, 'dump'
         18        DO_FCALL                                      0          
   29    19      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2AZhb
function name:  f
number of ops:  14
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d, !4 = $e, !5 = $sc_version_info
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
   27     5        BIND_GLOBAL                                              !5, 'sc_version_info'
   28     6        INIT_METHOD_CALL                                         !5, 'add'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !1
          9        SEND_VAR_EX                                              !2
         10        SEND_VAR_EX                                              !3
         11        SEND_VAR_EX                                              !4
         12        DO_FCALL                                      0          
   29    13      > RETURN                                                   null

End of function f

Class version_info:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2AZhb
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function __construct

Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2AZhb
function name:  add
number of ops:  14
compiled vars:  !0 = $name, !1 = $filename, !2 = $doc, !3 = $date, !4 = $ver
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      0
          3        RECV                                             !3      
          4        RECV                                             !4      
   10     5        INIT_ARRAY                                       ~7      !0, 'name'
   11     6        ADD_ARRAY_ELEMENT                                ~7      !1, 'filename'
   12     7        ADD_ARRAY_ELEMENT                                ~7      !2, 'document'
   13     8        ADD_ARRAY_ELEMENT                                ~7      !4, 'version'
   14     9        ADD_ARRAY_ELEMENT                                ~7      !3, 'date'
    9    10        FETCH_OBJ_W                                      $5      'vi'
         11        ASSIGN_DIM                                               $5, !1
   14    12        OP_DATA                                                  ~7
   16    13      > RETURN                                                   null

End of function add

Function dump:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2AZhb
function name:  dump
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'print_r'
          1        FETCH_OBJ_R                                      ~0      'vi'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   19     4      > RETURN                                                   null

End of function dump

End of class version_info.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.36 ms | 1392 KiB | 15 Q