3v4l.org

run code in 300+ PHP versions simultaneously
<?php $site = 1; $theAction = 'subscribe'; $mappings = array("1"=>"https://test1.com/?na=ajaxsub", "2"=>"https://test2.com/?na=ajaxsub", "3"=>"https://test3.com/?na=ajaxsub", "4"=>"https://test4.com/?na=ajaxsub"); $theAction == 'unsubscribe' ? $url = "https://test5.com/unsubscribe.php" : $url = $mappings[$site]; echo $url;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/URnqj
function name:  (null)
number of ops:  14
compiled vars:  !0 = $site, !1 = $theAction, !2 = $mappings, !3 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    4     1        ASSIGN                                                   !1, 'subscribe'
    6     2        ASSIGN                                                   !2, <array>
    8     3        IS_EQUAL                                                 !1, 'unsubscribe'
          4      > JMPZ                                                     ~7, ->8
          5    >   ASSIGN                                           ~8      !3, 'https%3A%2F%2Ftest5.com%2Funsubscribe.php'
          6        QM_ASSIGN                                        ~9      ~8
          7      > JMP                                                      ->11
          8    >   FETCH_DIM_R                                      ~10     !2, !0
          9        ASSIGN                                           ~11     !3, ~10
         10        QM_ASSIGN                                        ~9      ~11
         11    >   FREE                                                     ~9
   10    12        ECHO                                                     !3
   11    13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.24 ms | 996 KiB | 13 Q