3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(strtotime('-1 day')); $str = '1day'; var_dump(strtotime("-{$str}"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Eaqsb
function name:  (null)
number of ops:  16
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'strtotime'
          2        SEND_VAL                                                 '-1+day'
          3        DO_ICALL                                         $1      
          4        SEND_VAR                                                 $1
          5        DO_ICALL                                                 
    5     6        ASSIGN                                                   !0, '1day'
    7     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'strtotime'
          9        NOP                                                      
         10        FAST_CONCAT                                      ~4      '-', !0
         11        SEND_VAL                                                 ~4
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
310.2 ms | 1394 KiB | 17 Q