3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myModel { public static function all() { return 1; } } class myClass { public $models; public function __construct() { $this->models->myModel = new myModel; $results = $this->models->myModel::all(); } } $result = new myClass;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k0il8
function name:  (null)
number of ops:  4
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'myClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

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

End of function all

End of class myModel.

Class myClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k0il8
function name:  __construct
number of ops:  12
compiled vars:  !0 = $results
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $3      'myModel'
          1        DO_FCALL                                      0          
          2        FETCH_OBJ_W                                      $1      'models'
          3        ASSIGN_OBJ                                               $1, 'myModel'
          4        OP_DATA                                                  $3
   16     5        FETCH_OBJ_R                                      ~5      'models'
          6        FETCH_OBJ_R                                      ~6      ~5, 'myModel'
          7        FETCH_CLASS                                   0  $7      ~6
          8        INIT_STATIC_METHOD_CALL                                  $7, 'all'
          9        DO_FCALL                                      0  $8      
         10        ASSIGN                                                   !0, $8
   17    11      > RETURN                                                   null

End of function __construct

End of class myClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.46 ms | 1394 KiB | 13 Q