3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Subclass extends DateTimeImmutable { public function __construct() { parent::__construct(); var_dump("construc"); } } $foo = new Subclass('2023-01-01 12:12:13'); $foo2 = $foo->modify('+7 days'); /** @psalm-trace $foo2 */ echo get_class($foo2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Y7jU
function name:  (null)
number of ops:  11
compiled vars:  !0 = $foo, !1 = $foo2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'Subclass'
          1        SEND_VAL_EX                                              '2023-01-01+12%3A12%3A13'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   12     4        INIT_METHOD_CALL                                         !0, 'modify'
          5        SEND_VAL_EX                                              '%2B7+days'
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
   14     8        GET_CLASS                                        ~7      !1
          9        ECHO                                                     ~7
         10      > RETURN                                                   1

Class Subclass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Y7jU
function name:  __construct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
    7     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAL                                                 'construc'
          4        DO_ICALL                                                 
    8     5      > RETURN                                                   null

End of function __construct

End of class Subclass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.95 ms | 1395 KiB | 15 Q