3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $v; public function __construct($v) { $this->v = $v; } } $d1 = new DateTime(); $d2 = clone $d1; $d2->add(new DateInterval("P2D")); var_dump($d1); var_dump($d2); $a1 = new A($d1); $a2 = new A($d2); var_dump($a1 < $a2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h0ikG
function name:  (null)
number of ops:  30
compiled vars:  !0 = $d1, !1 = $d2, !2 = $a1, !3 = $a2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $4      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   13     3        CLONE                                            ~7      !0
          4        ASSIGN                                                   !1, ~7
   14     5        INIT_METHOD_CALL                                         !1, 'add'
          6        NEW                                              $9      'DateInterval'
          7        SEND_VAL_EX                                              'P2D'
          8        DO_FCALL                                      0          
          9        SEND_VAR_NO_REF_EX                                       $9
         10        DO_FCALL                                      0          
   16    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   17    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
   19    17        NEW                                              $14     'A'
         18        SEND_VAR_EX                                              !0
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !2, $14
   20    21        NEW                                              $17     'A'
         22        SEND_VAR_EX                                              !1
         23        DO_FCALL                                      0          
         24        ASSIGN                                                   !3, $17
   22    25        INIT_FCALL                                               'var_dump'
         26        IS_SMALLER                                       ~20     !2, !3
         27        SEND_VAL                                                 ~20
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

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

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.16 ms | 1396 KiB | 15 Q