3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = rand(1, 10000); $x = $original + 5; $x = 2 * $x; $x = $x - 4; $x = $x / 2; $result = $x - $original; print $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/44GJl
function name:  (null)
number of ops:  17
compiled vars:  !0 = $original, !1 = $x, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'rand'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 10000
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    4     5        ADD                                              ~5      !0, 5
          6        ASSIGN                                                   !1, ~5
    5     7        MUL                                              ~7      !1, 2
          8        ASSIGN                                                   !1, ~7
    6     9        SUB                                              ~9      !1, 4
         10        ASSIGN                                                   !1, ~9
    7    11        DIV                                              ~11     !1, 2
         12        ASSIGN                                                   !1, ~11
    8    13        SUB                                              ~13     !1, !0
         14        ASSIGN                                                   !2, ~13
    9    15        ECHO                                                     !2
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.83 ms | 983 KiB | 14 Q