3v4l.org

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

Class DateTimeGenerator:
Function getdatetime:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3QXVK
function name:  getDateTime
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $0      'DateTime'
          1        DO_FCALL                                      0          
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
    7     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function getdatetime

End of class DateTimeGenerator.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
126.48 ms | 1444 KiB | 14 Q