3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DatePeriodExample extends \DatePeriod { public static function test(): self { return new self(new \DateTimeImmutable('2022-01-01'), new \DateInterval('P1M'), new \DateTimeImmutable('2022-01-31')); } } echo get_class(DatePeriodExample::test());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0URmF
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_STATIC_METHOD_CALL                                  'DatePeriodExample', 'test'
          1        DO_FCALL                                      0  $0      
          2        GET_CLASS                                        ~1      $0
          3        ECHO                                                     ~1
          4      > RETURN                                                   1

Class DatePeriodExample:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0URmF
function name:  test
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                          self                $0      
          1        NEW                                              $1      'DateTimeImmutable'
          2        SEND_VAL_EX                                              '2022-01-01'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $1
          5        NEW                                              $3      'DateInterval'
          6        SEND_VAL_EX                                              'P1M'
          7        DO_FCALL                                      0          
          8        SEND_VAR_NO_REF_EX                                       $3
          9        NEW                                              $5      'DateTimeImmutable'
         10        SEND_VAL_EX                                              '2022-01-31'
         11        DO_FCALL                                      0          
         12        SEND_VAR_NO_REF_EX                                       $5
         13        DO_FCALL                                      0          
         14        VERIFY_RETURN_TYPE                                       $0
         15      > RETURN                                                   $0
    7    16*       VERIFY_RETURN_TYPE                                       
         17*     > RETURN                                                   null

End of function test

End of class DatePeriodExample.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.69 ms | 995 KiB | 13 Q