3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new DateInterval("P0Y0DT17H45M0S"); $b = new DateInterval("P0Y0DT21H15M0S"); $unique = array_unique([$a, $b], SORT_REGULAR); var_dump($a === $b); var_dump($unique);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OmC6e
function name:  (null)
number of ops:  23
compiled vars:  !0 = $a, !1 = $b, !2 = $unique
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'DateInterval'
          1        SEND_VAL_EX                                              'P0Y0DT17H45M0S'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    3     4        NEW                                              $6      'DateInterval'
          5        SEND_VAL_EX                                              'P0Y0DT21H15M0S'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
    4     8        INIT_FCALL                                               'array_unique'
          9        INIT_ARRAY                                       ~9      !0
         10        ADD_ARRAY_ELEMENT                                ~9      !1
         11        SEND_VAL                                                 ~9
         12        SEND_VAL                                                 0
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !2, $10
    5    15        INIT_FCALL                                               'var_dump'
         16        IS_IDENTICAL                                     ~12     !0, !1
         17        SEND_VAL                                                 ~12
         18        DO_ICALL                                                 
    6    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.78 ms | 1386 KiB | 17 Q