3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $properties; public function doSomething($passed=NULL) { Test::create('test', 'test', 'test'); } public static function create($id /* [ $arg, ... */) { $arguments = func_get_args(); $command = new self($arguments); $res = new static($command, $this->properties); var_dump($res); } } $test = new Test(); $test->doSomething();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DT8sL
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'doSomething'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Test:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DT8sL
function name:  doSomething
number of ops:  7
compiled vars:  !0 = $passed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      null
    5     1        INIT_STATIC_METHOD_CALL                                  'Test', 'create'
          2        SEND_VAL_EX                                              'test'
          3        SEND_VAL_EX                                              'test'
          4        SEND_VAL_EX                                              'test'
          5        DO_FCALL                                      0          
    6     6      > RETURN                                                   null

End of function dosomething

Function create:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DT8sL
function name:  create
number of ops:  19
compiled vars:  !0 = $id, !1 = $arguments, !2 = $command, !3 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        FUNC_GET_ARGS                                    ~4      
          2        ASSIGN                                                   !1, ~4
    9     3        NEW                          self                $6      
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !2, $6
   10     7        NEW                          static              $9      
          8        SEND_VAR_EX                                              !2
          9        CHECK_FUNC_ARG                                           
         10        FETCH_THIS                                       $10     
         11        FETCH_OBJ_FUNC_ARG                               $11     $10, 'properties'
         12        SEND_FUNC_ARG                                            $11
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !3, $9
   11    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
   12    18      > RETURN                                                   null

End of function create

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.85 ms | 1396 KiB | 15 Q