3v4l.org

run code in 500+ PHP versions simultaneously
<?php $distance = 10; var_dump("-{$distance} hours"); var_dump((-$distance) . " hours");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KRVLH
function name:  (null)
number of ops:  13
compiled vars:  !0 = $distance
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 10
    5     1        INIT_FCALL                                                   'var_dump'
          2        ROPE_INIT                                         3  ~3      '-'
          3        ROPE_ADD                                          1  ~3      ~3, !0
          4        ROPE_END                                          2  ~2      ~3, '+hours'
          5        SEND_VAL                                                     ~2
          6        DO_ICALL                                                     
    6     7        INIT_FCALL                                                   'var_dump'
          8        MUL                                                  ~6      !0, -1
          9        CONCAT                                               ~7      ~6, '+hours'
         10        SEND_VAL                                                     ~7
         11        DO_ICALL                                                     
         12      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153 ms | 1034 KiB | 9 Q