3v4l.org

run code in 300+ PHP versions simultaneously
<?php $endDateSplit1 = 600; $endDateSplit2 = 550; $r = abs($endDateSplit1 - 500) < abs($endDateSplit2 - 500) ? -1 : 1; echo $r;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HaLLe
function name:  (null)
number of ops:  18
compiled vars:  !0 = $endDateSplit1, !1 = $endDateSplit2, !2 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 600
    3     1        ASSIGN                                                   !1, 550
    6     2        INIT_FCALL                                               'abs'
          3        SUB                                              ~5      !0, 500
          4        SEND_VAL                                                 ~5
          5        DO_ICALL                                         $6      
          6        INIT_FCALL                                               'abs'
          7        SUB                                              ~7      !1, 500
          8        SEND_VAL                                                 ~7
          9        DO_ICALL                                         $8      
         10        IS_SMALLER                                               $6, $8
         11      > JMPZ                                                     ~9, ->14
         12    >   QM_ASSIGN                                        ~10     -1
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~10     1
         15    >   ASSIGN                                                   !2, ~10
    8    16        ECHO                                                     !2
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.59 ms | 1395 KiB | 15 Q