3v4l.org

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

Class this: [no user functions]
Class that:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TuCoC
function name:  doSomething
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $0      'this'
          1        DO_FCALL                                      0          
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
   10     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function dosomething

End of class that.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.76 ms | 997 KiB | 14 Q