3v4l.org

run code in 300+ PHP versions simultaneously
<?php $from = new DateTime('2018-01-20'); $to = new DateTime('2018-02-20'); var_dump($from > $to); var_dump($from->diff($to)); var_dump($to > $from); var_dump($to->diff($from));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vC3hK
function name:  (null)
number of ops:  29
compiled vars:  !0 = $from, !1 = $to
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DateTime'
          1        SEND_VAL_EX                                              '2018-01-20'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    4     4        NEW                                              $5      'DateTime'
          5        SEND_VAL_EX                                              '2018-02-20'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
    6     8        INIT_FCALL                                               'var_dump'
          9        IS_SMALLER                                       ~8      !1, !0
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                                 
    7    12        INIT_FCALL                                               'var_dump'
         13        INIT_METHOD_CALL                                         !0, 'diff'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0  $10     
         16        SEND_VAR                                                 $10
         17        DO_ICALL                                                 
    9    18        INIT_FCALL                                               'var_dump'
         19        IS_SMALLER                                       ~12     !0, !1
         20        SEND_VAL                                                 ~12
         21        DO_ICALL                                                 
   10    22        INIT_FCALL                                               'var_dump'
         23        INIT_METHOD_CALL                                         !1, 'diff'
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0  $14     
         26        SEND_VAR                                                 $14
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.75 ms | 1395 KiB | 15 Q