3v4l.org

run code in 300+ PHP versions simultaneously
<?php class derp { function __construct($derp) { return $this; } } class test { function get() { return true; } } $ob = new derp((new test)->get()); print_r($ob);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dFfbV
function name:  (null)
number of ops:  12
compiled vars:  !0 = $ob
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'derp'
          1        NEW                                              $2      'test'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $2, 'get'
          4        DO_FCALL                                      0  $4      
          5        SEND_VAR_NO_REF_EX                                       $4
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $1
   10     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class derp:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dFfbV
function name:  __construct
number of ops:  4
compiled vars:  !0 = $derp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        FETCH_THIS                                       ~1      
          2      > RETURN                                                   ~1
          3*     > RETURN                                                   null

End of function __construct

End of class derp.

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

End of function get

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.29 ms | 1395 KiB | 15 Q