3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = '123a'; $integer = -$string; // warning! $integer = (int) $string; $integer = -$integer; // too long! $integer = -(int)$string; // alright ! $integer = @-(int)$string; // also possible ! $integer = @-@(int)@$string; // too much?
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m6F8G
function name:  (null)
number of ops:  26
compiled vars:  !0 = $string, !1 = $integer
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '123a'
    5     1        MUL                                                  ~3      !0, -1
          2        ASSIGN                                                       !1, ~3
    7     3        CAST                                              4  ~5      !0
          4        ASSIGN                                                       !1, ~5
    8     5        MUL                                                  ~7      !1, -1
          6        ASSIGN                                                       !1, ~7
   10     7        CAST                                              4  ~9      !0
          8        MUL                                                  ~10     ~9, -1
          9        ASSIGN                                                       !1, ~10
   11    10        BEGIN_SILENCE                                        ~12     
         11        CAST                                              4  ~13     !0
         12        MUL                                                  ~14     ~13, -1
         13        END_SILENCE                                                  ~12
         14        ASSIGN                                                       !1, ~14
   12    15        BEGIN_SILENCE                                        ~16     
         16        BEGIN_SILENCE                                        ~17     
         17        BEGIN_SILENCE                                        ~18     
         18        FETCH_R                          local               ~19     'string'
         19        END_SILENCE                                                  ~18
         20        CAST                                              4  ~20     ~19
         21        END_SILENCE                                                  ~17
         22        MUL                                                  ~21     ~20, -1
         23        END_SILENCE                                                  ~16
         24        ASSIGN                                                       !1, ~21
         25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.61 ms | 1349 KiB | 13 Q