3v4l.org

run code in 300+ PHP versions simultaneously
<?php $info1 = array();$info2 = array();$info3 = array();$info4 = array(); $info1['multiply'] = $info2['multiply'] = $info3['multiply'] = 1000; $info2['close'] = 51.74; $info2['high'] = 52.017; $info2['open'] = 51.687; $info2['low'] = 51.666; $info1['close'] = 51.74; $info1['high'] = 52.017; $info1['open'] = 51.687; $info1['low'] = 51.666; $info3['close'] = 51.731; $info3['high'] = 52.013; $info3['open'] = 51.744; $info3['low'] = 51.703; $info4['close'] = 51.692; $info4['high'] = 51.955; $info4['open'] = 51.732; $info4['low'] = 51.692; $typicalSpread = 240; $spikes = array(); if (abs($info1['close'] * $info1['multiply'] - $info2['high'] * $info1['multiply']) >= $typicalSpread) { if (abs($info2['high'] * $info1['multiply'] - $info3['open'] * $info1['multiply']) >= $typicalSpread) { if (abs($info3['high'] * $info1['multiply'] - $info2['close'] * $info1['multiply']) < $typicalSpread && abs($info3['high'] * $info1['multiply'] - $info4['open'] * $info1['multiply']) < $typicalSpread) { $spikes[] = 'first'; } } else { if (abs($info3['high'] * $info1['multiply'] - $info2['close'] * $info1['multiply']) < $typicalSpread && abs($info3['high'] * $info1['multiply'] - $info4['open'] * $info1['multiply']) >= $typicalSpread) { $spikes[] = 'second'; } } } if (abs($info1['close'] * $info1['multiply'] - $info2['low'] * $info1['multiply']) >= $typicalSpread) { if (abs($info2['low'] * $info1['multiply'] - $info3['open'] * $info1['multiply']) >= $typicalSpread) { if (abs($info3['low'] * $info1['multiply'] - $info2['close'] * $info1['multiply']) < $typicalSpread && abs($info3['low'] * $info1['multiply'] - $info4['open'] * $info1['multiply']) < $typicalSpread) { $spikes[] = 'third'; } } else { if (abs($info3['low'] * $info1['multiply'] - $info2['close'] * $info1['multiply']) < $typicalSpread && abs($info3['low'] * $info1['multiply'] - $info4['open'] * $info1['multiply']) >= $typicalSpread) { $spikes[] = 'fourth'; } } } var_dump($spikes);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 123
Branch analysis from position: 56
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 96
Branch analysis from position: 68
2 jumps found. (Code = 46) Position 1 = 80, Position 2 = 92
Branch analysis from position: 80
2 jumps found. (Code = 43) Position 1 = 93, Position 2 = 95
Branch analysis from position: 93
1 jumps found. (Code = 42) Position 1 = 123
Branch analysis from position: 123
2 jumps found. (Code = 43) Position 1 = 135, Position 2 = 202
Branch analysis from position: 135
2 jumps found. (Code = 43) Position 1 = 147, Position 2 = 175
Branch analysis from position: 147
2 jumps found. (Code = 46) Position 1 = 159, Position 2 = 171
Branch analysis from position: 159
2 jumps found. (Code = 43) Position 1 = 172, Position 2 = 174
Branch analysis from position: 172
1 jumps found. (Code = 42) Position 1 = 202
Branch analysis from position: 202
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 174
Branch analysis from position: 171
Branch analysis from position: 175
2 jumps found. (Code = 46) Position 1 = 187, Position 2 = 199
Branch analysis from position: 187
2 jumps found. (Code = 43) Position 1 = 200, Position 2 = 202
Branch analysis from position: 200
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 202
Branch analysis from position: 199
Branch analysis from position: 202
Branch analysis from position: 95
Branch analysis from position: 92
Branch analysis from position: 96
2 jumps found. (Code = 46) Position 1 = 108, Position 2 = 120
Branch analysis from position: 108
2 jumps found. (Code = 43) Position 1 = 121, Position 2 = 123
Branch analysis from position: 121
2 jumps found. (Code = 43) Position 1 = 135, Position 2 = 202
Branch analysis from position: 135
Branch analysis from position: 202
Branch analysis from position: 123
Branch analysis from position: 120
Branch analysis from position: 123
filename:       /in/0a7fn
function name:  (null)
number of ops:  206
compiled vars:  !0 = $info1, !1 = $info2, !2 = $info3, !3 = $info4, !4 = $typicalSpread, !5 = $spikes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
          1        ASSIGN                                                   !1, <array>
          2        ASSIGN                                                   !2, <array>
          3        ASSIGN                                                   !3, <array>
    3     4        ASSIGN_DIM                                       ~12     !2, 'multiply'
          5        OP_DATA                                                  1000
          6        ASSIGN_DIM                                       ~11     !1, 'multiply'
          7        OP_DATA                                                  ~12
          8        ASSIGN_DIM                                               !0, 'multiply'
          9        OP_DATA                                                  ~11
    4    10        ASSIGN_DIM                                               !1, 'close'
         11        OP_DATA                                                  51.74
    5    12        ASSIGN_DIM                                               !1, 'high'
         13        OP_DATA                                                  52.017
    6    14        ASSIGN_DIM                                               !1, 'open'
         15        OP_DATA                                                  51.687
    7    16        ASSIGN_DIM                                               !1, 'low'
         17        OP_DATA                                                  51.666
    9    18        ASSIGN_DIM                                               !0, 'close'
         19        OP_DATA                                                  51.74
   10    20        ASSIGN_DIM                                               !0, 'high'
         21        OP_DATA                                                  52.017
   11    22        ASSIGN_DIM                                               !0, 'open'
         23        OP_DATA                                                  51.687
   12    24        ASSIGN_DIM                                               !0, 'low'
         25        OP_DATA                                                  51.666
   14    26        ASSIGN_DIM                                               !2, 'close'
         27        OP_DATA                                                  51.731
   15    28        ASSIGN_DIM                                               !2, 'high'
         29        OP_DATA                                                  52.013
   16    30        ASSIGN_DIM                                               !2, 'open'
         31        OP_DATA                                                  51.744
   17    32        ASSIGN_DIM                                               !2, 'low'
         33        OP_DATA                                                  51.703
   19    34        ASSIGN_DIM                                               !3, 'close'
         35        OP_DATA                                                  51.692
   20    36        ASSIGN_DIM                                               !3, 'high'
         37        OP_DATA                                                  51.955
   21    38        ASSIGN_DIM                                               !3, 'open'
         39        OP_DATA                                                  51.732
   22    40        ASSIGN_DIM                                               !3, 'low'
         41        OP_DATA                                                  51.692
   24    42        ASSIGN                                                   !4, 240
   26    43        ASSIGN                                                   !5, <array>
   27    44        INIT_FCALL                                               'abs'
         45        FETCH_DIM_R                                      ~31     !0, 'close'
         46        FETCH_DIM_R                                      ~32     !0, 'multiply'
         47        MUL                                              ~33     ~31, ~32
         48        FETCH_DIM_R                                      ~34     !1, 'high'
         49        FETCH_DIM_R                                      ~35     !0, 'multiply'
         50        MUL                                              ~36     ~34, ~35
         51        SUB                                              ~37     ~33, ~36
         52        SEND_VAL                                                 ~37
         53        DO_ICALL                                         $38     
         54        IS_SMALLER_OR_EQUAL                                      !4, $38
         55      > JMPZ                                                     ~39, ->123
   28    56    >   INIT_FCALL                                               'abs'
         57        FETCH_DIM_R                                      ~40     !1, 'high'
         58        FETCH_DIM_R                                      ~41     !0, 'multiply'
         59        MUL                                              ~42     ~40, ~41
         60        FETCH_DIM_R                                      ~43     !2, 'open'
         61        FETCH_DIM_R                                      ~44     !0, 'multiply'
         62        MUL                                              ~45     ~43, ~44
         63        SUB                                              ~46     ~42, ~45
         64        SEND_VAL                                                 ~46
         65        DO_ICALL                                         $47     
         66        IS_SMALLER_OR_EQUAL                                      !4, $47
         67      > JMPZ                                                     ~48, ->96
   29    68    >   INIT_FCALL                                               'abs'
         69        FETCH_DIM_R                                      ~49     !2, 'high'
         70        FETCH_DIM_R                                      ~50     !0, 'multiply'
         71        MUL                                              ~51     ~49, ~50
         72        FETCH_DIM_R                                      ~52     !1, 'close'
         73        FETCH_DIM_R                                      ~53     !0, 'multiply'
         74        MUL                                              ~54     ~52, ~53
         75        SUB                                              ~55     ~51, ~54
         76        SEND_VAL                                                 ~55
         77        DO_ICALL                                         $56     
         78        IS_SMALLER                                       ~57     $56, !4
         79      > JMPZ_EX                                          ~57     ~57, ->92
   30    80    >   INIT_FCALL                                               'abs'
         81        FETCH_DIM_R                                      ~58     !2, 'high'
         82        FETCH_DIM_R                                      ~59     !0, 'multiply'
         83        MUL                                              ~60     ~58, ~59
         84        FETCH_DIM_R                                      ~61     !3, 'open'
         85        FETCH_DIM_R                                      ~62     !0, 'multiply'
         86        MUL                                              ~63     ~61, ~62
         87        SUB                                              ~64     ~60, ~63
         88        SEND_VAL                                                 ~64
         89        DO_ICALL                                         $65     
         90        IS_SMALLER                                       ~66     $65, !4
         91        BOOL                                             ~57     ~66
         92    > > JMPZ                                                     ~57, ->95
   31    93    >   ASSIGN_DIM                                               !5
         94        OP_DATA                                                  'first'
         95    > > JMP                                                      ->123
   34    96    >   INIT_FCALL                                               'abs'
         97        FETCH_DIM_R                                      ~68     !2, 'high'
         98        FETCH_DIM_R                                      ~69     !0, 'multiply'
         99        MUL                                              ~70     ~68, ~69
        100        FETCH_DIM_R                                      ~71     !1, 'close'
        101        FETCH_DIM_R                                      ~72     !0, 'multiply'
        102        MUL                                              ~73     ~71, ~72
        103        SUB                                              ~74     ~70, ~73
        104        SEND_VAL                                                 ~74
        105        DO_ICALL                                         $75     
        106        IS_SMALLER                                       ~76     $75, !4
        107      > JMPZ_EX                                          ~76     ~76, ->120
   35   108    >   INIT_FCALL                                               'abs'
        109        FETCH_DIM_R                                      ~77     !2, 'high'
        110        FETCH_DIM_R                                      ~78     !0, 'multiply'
        111        MUL                                              ~79     ~77, ~78
        112        FETCH_DIM_R                                      ~80     !3, 'open'
        113        FETCH_DIM_R                                      ~81     !0, 'multiply'
        114        MUL                                              ~82     ~80, ~81
        115        SUB                                              ~83     ~79, ~82
        116        SEND_VAL                                                 ~83
        117        DO_ICALL                                         $84     
        118        IS_SMALLER_OR_EQUAL                              ~85     !4, $84
        119        BOOL                                             ~76     ~85
        120    > > JMPZ                                                     ~76, ->123
   36   121    >   ASSIGN_DIM                                               !5
        122        OP_DATA                                                  'second'
   41   123    >   INIT_FCALL                                               'abs'
        124        FETCH_DIM_R                                      ~87     !0, 'close'
        125        FETCH_DIM_R                                      ~88     !0, 'multiply'
        126        MUL                                              ~89     ~87, ~88
        127        FETCH_DIM_R                                      ~90     !1, 'low'
        128        FETCH_DIM_R                                      ~91     !0, 'multiply'
        129        MUL                                              ~92     ~90, ~91
        130        SUB                                              ~93     ~89, ~92
        131        SEND_VAL                                                 ~93
        132        DO_ICALL                                         $94     
        133        IS_SMALLER_OR_EQUAL                                      !4, $94
        134      > JMPZ                                                     ~95, ->202
   42   135    >   INIT_FCALL                                               'abs'
        136        FETCH_DIM_R                                      ~96     !1, 'low'
        137        FETCH_DIM_R                                      ~97     !0, 'multiply'
        138        MUL                                              ~98     ~96, ~97
        139        FETCH_DIM_R                                      ~99     !2, 'open'
        140        FETCH_DIM_R                                      ~100    !0, 'multiply'
        141        MUL                                              ~101    ~99, ~100
        142        SUB                                              ~102    ~98, ~101
        143        SEND_VAL                                                 ~102
        144        DO_ICALL                                         $103    
        145        IS_SMALLER_OR_EQUAL                                      !4, $103
        146      > JMPZ                                                     ~104, ->175
   43   147    >   INIT_FCALL                                               'abs'
        148        FETCH_DIM_R                                      ~105    !2, 'low'
        149        FETCH_DIM_R                                      ~106    !0, 'multiply'
        150        MUL                                              ~107    ~105, ~106
        151        FETCH_DIM_R                                      ~108    !1, 'close'
        152        FETCH_DIM_R                                      ~109    !0, 'multiply'
        153        MUL                                              ~110    ~108, ~109
        154        SUB                                              ~111    ~107, ~110
        155        SEND_VAL                                                 ~111
        156        DO_ICALL                                         $112    
        157        IS_SMALLER                                       ~113    $112, !4
        158      > JMPZ_EX                                          ~113    ~113, ->171
   44   159    >   INIT_FCALL                                               'abs'
        160        FETCH_DIM_R                                      ~114    !2, 'low'
        161        FETCH_DIM_R                                      ~115    !0, 'multiply'
        162        MUL                                              ~116    ~114, ~115
        163        FETCH_DIM_R                                      ~117    !3, 'open'
        164        FETCH_DIM_R                                      ~118    !0, 'multiply'
        165        MUL                                              ~119    ~117, ~118
        166        SUB                                              ~120    ~116, ~119
        167        SEND_VAL                                                 ~120
        168        DO_ICALL                                         $121    
        169        IS_SMALLER                                       ~122    $121, !4
        170        BOOL                                             ~113    ~122
        171    > > JMPZ                                                     ~113, ->174
   45   172    >   ASSIGN_DIM                                               !5
        173        OP_DATA                                                  'third'
        174    > > JMP                                                      ->202
   48   175    >   INIT_FCALL                                               'abs'
        176        FETCH_DIM_R                                      ~124    !2, 'low'
        177        FETCH_DIM_R                                      ~125    !0, 'multiply'
        178        MUL                                              ~126    ~124, ~125
        179        FETCH_DIM_R                                      ~127    !1, 'close'
        180        FETCH_DIM_R                                      ~128    !0, 'multiply'
        181        MUL                                              ~129    ~127, ~128
        182        SUB                                              ~130    ~126, ~129
        183        SEND_VAL                                                 ~130
        184        DO_ICALL                                         $131    
        185        IS_SMALLER                                       ~132    $131, !4
        186      > JMPZ_EX                                          ~132    ~132, ->199
   49   187    >   INIT_FCALL                                               'abs'
        188        FETCH_DIM_R                                      ~133    !2, 'low'
        189        FETCH_DIM_R                                      ~134    !0, 'multiply'
        190        MUL                                              ~135    ~133, ~134
        191        FETCH_DIM_R                                      ~136    !3, 'open'
        192        FETCH_DIM_R                                      ~137    !0, 'multiply'
        193        MUL                                              ~138    ~136, ~137
        194        SUB                                              ~139    ~135, ~138
        195        SEND_VAL                                                 ~139
        196        DO_ICALL                                         $140    
        197        IS_SMALLER_OR_EQUAL                              ~141    !4, $140
        198        BOOL                                             ~132    ~141
        199    > > JMPZ                                                     ~132, ->202
   50   200    >   ASSIGN_DIM                                               !5
        201        OP_DATA                                                  'fourth'
   55   202    >   INIT_FCALL                                               'var_dump'
        203        SEND_VAR                                                 !5
        204        DO_ICALL                                                 
        205      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.84 ms | 1404 KiB | 17 Q