3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('2019-04-05 12:34:56.123456'); $date1 = unserialize(serialize($date)); $date2 = new DateTime($date->format('Y-m-d H:i:s.u')); //print_r("start php version ".phpversion()); //print_r("\n"); //print_r("\n"); print_r("date==date1:"); print_r($date==$date1); print_r("\n"); print_r("date==date2:"); print_r($date==$date2); print_r("\n"); print_r("date1==date2:"); print_r($date1==$date2); print_r("\n"); print_r("finish");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3vaor
function name:  (null)
number of ops:  52
compiled vars:  !0 = $date, !1 = $date1, !2 = $date2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'DateTime'
          1        SEND_VAL_EX                                              '2019-04-05+12%3A34%3A56.123456'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    4     4        INIT_FCALL                                               'unserialize'
          5        INIT_FCALL                                               'serialize'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        SEND_VAR                                                 $6
          9        DO_ICALL                                         $7      
         10        ASSIGN                                                   !1, $7
    5    11        NEW                                              $9      'DateTime'
         12        INIT_METHOD_CALL                                         !0, 'format'
         13        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As.u'
         14        DO_FCALL                                      0  $10     
         15        SEND_VAR_NO_REF_EX                                       $10
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !2, $9
    9    18        INIT_FCALL                                               'print_r'
         19        SEND_VAL                                                 'date%3D%3Ddate1%3A'
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'print_r'
         22        IS_EQUAL                                         ~14     !0, !1
         23        SEND_VAL                                                 ~14
         24        DO_ICALL                                                 
   11    25        INIT_FCALL                                               'print_r'
         26        SEND_VAL                                                 '%0A'
         27        DO_ICALL                                                 
   12    28        INIT_FCALL                                               'print_r'
         29        SEND_VAL                                                 'date%3D%3Ddate2%3A'
         30        DO_ICALL                                                 
   13    31        INIT_FCALL                                               'print_r'
         32        IS_EQUAL                                         ~18     !0, !2
         33        SEND_VAL                                                 ~18
         34        DO_ICALL                                                 
   14    35        INIT_FCALL                                               'print_r'
         36        SEND_VAL                                                 '%0A'
         37        DO_ICALL                                                 
   15    38        INIT_FCALL                                               'print_r'
         39        SEND_VAL                                                 'date1%3D%3Ddate2%3A'
         40        DO_ICALL                                                 
   16    41        INIT_FCALL                                               'print_r'
         42        IS_EQUAL                                         ~22     !1, !2
         43        SEND_VAL                                                 ~22
         44        DO_ICALL                                                 
   17    45        INIT_FCALL                                               'print_r'
         46        SEND_VAL                                                 '%0A'
         47        DO_ICALL                                                 
   18    48        INIT_FCALL                                               'print_r'
         49        SEND_VAL                                                 'finish'
         50        DO_ICALL                                                 
         51      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.99 ms | 1005 KiB | 16 Q