3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datetime_before = date_create('now'); $datetime_before->setTime(1,1,1,1); $datetime_after = clone($datetime_before); $datetime_after->modify('-100 ms'); $string = $datetime_after->format('Y-m-d H:i:s.u'); if (str_contains($string, "-999")) { echo 'before: '; var_dump($datetime_before); echo PHP_EOL; echo 'after: '; var_dump($datetime_after); echo PHP_EOL; exit; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 35
Branch analysis from position: 24
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YDEq2
function name:  (null)
number of ops:  36
compiled vars:  !0 = $datetime_before, !1 = $datetime_after, !2 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'date_create'
          1        SEND_VAL                                                 'now'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    4     4        INIT_METHOD_CALL                                         !0, 'setTime'
          5        SEND_VAL_EX                                              1
          6        SEND_VAL_EX                                              1
          7        SEND_VAL_EX                                              1
          8        SEND_VAL_EX                                              1
          9        DO_FCALL                                      0          
    6    10        CLONE                                            ~6      !0
         11        ASSIGN                                                   !1, ~6
    8    12        INIT_METHOD_CALL                                         !1, 'modify'
         13        SEND_VAL_EX                                              '-100+ms'
         14        DO_FCALL                                      0          
   10    15        INIT_METHOD_CALL                                         !1, 'format'
         16        SEND_VAL_EX                                              'Y-m-d+H%3Ai%3As.u'
         17        DO_FCALL                                      0  $9      
         18        ASSIGN                                                   !2, $9
   12    19        INIT_FCALL                                               'str_contains'
         20        SEND_VAR                                                 !2
         21        SEND_VAL                                                 '-999'
         22        DO_ICALL                                         $11     
         23      > JMPZ                                                     $11, ->35
   13    24    >   ECHO                                                     'before%3A+'
   14    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                                 
   15    28        ECHO                                                     '%0A'
   17    29        ECHO                                                     'after%3A+'
   18    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !1
         32        DO_ICALL                                                 
   19    33        ECHO                                                     '%0A'
   20    34      > EXIT                                                     
   21    35    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.91 ms | 1001 KiB | 16 Q