3v4l.org

run code in 500+ PHP versions simultaneously
<?php function tryGetValue1( $array, $key, Closure $default ) { return array_key_exists($key, $array) ? $array[$key] : $default(); } function tryGetValue2( $array, $key, Closure $default ) { return ($value = @$array[$key]) !== null || array_key_exists($key, $array) ? $value : $default(); } function tryGetValue3( $array, $key, Closure $default ) { return isset($array[$key]) || array_key_exists($key, $array) ? $array[$key] : $default(); } function tryGetValueNotNull1( $array, $key, Closure $default ) { return ($value = @$array[$key]) !== null ? $value : $default(); } function tryGetValueNotNull2( $array, $key, Closure $default ) { return isset($array[$key]) ? $array[$key] : $default(); } $derp = function() { return 0; }; $k = array( 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' ); $r = array( 'a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, 'e' => 5 ); $x = 0; // "spin up" any JIT beforehand for ( $i = 0; $i < 100; ++$i ) { $x &= tryGetValue1( $r, $k[$i%10], $derp ); if ( $x > 5 ) throw new RuntimeException('The sun might be exploding.'); } for ( $i = 0; $i < 100; ++$i ) { $x &= tryGetValue2( $r, $k[$i%10], $derp ); if ( $x > 5 ) throw new RuntimeException('The sun might be exploding.'); } for ( $i = 0; $i < 100; ++$i ) { $x &= tryGetValue3( $r, $k[$i%10], $derp ); if ( $x > 5 ) throw new RuntimeException('The sun might be exploding.'); } for ( $i = 0; $i < 100; ++$i ) { $x &= tryGetValueNotNull1( $r, $k[$i%10], $derp ); if ( $x > 5 ) throw new RuntimeException('The sun might be exploding.'); } for ( $i = 0; $i < 100; ++$i ) { $x &= tryGetValueNotNull2( $r, $k[$i%10], $derp ); if ( $x > 5 ) throw new RuntimeException('The sun might be exploding.'); } $start=microtime(true); // start timer for ( $i = 0; $i < 50000; ++$i ) { $x = tryGetValue1( $r, $k[$i%10], $derp ); if ( $x > 5 ) throw new RuntimeException('The sun might be exploding.'); } $end=microtime(true); // end timer echo 'tryGetValue1: ', substr( $end-$start, 0, 6 ), PHP_EOL; // echo results $start=microtime(true); // start timer for ( $i = 0; $i < 50000; ++$i ) { $x = tryGetValue2( $r, $k[$i%10], $derp ); if ( $x > 5 ) throw new RuntimeException('The sun might be exploding.'); } $end=microtime(true); // end timer echo 'tryGetValue2: ', substr( $end-$start, 0, 6 ), PHP_EOL; // echo results $start=microtime(true); // start timer for ( $i = 0; $i < 50000; ++$i ) { $x = tryGetValue3( $r, $k[$i%10], $derp ); if ( $x > 5 ) throw new RuntimeException('The sun might be exploding.'); } $end=microtime(true); // end timer echo 'tryGetValue3: ', substr( $end-$start, 0, 6 ), PHP_EOL; // echo results $start=microtime(true); // start timer for ( $i = 0; $i < 50000; ++$i ) { $x = tryGetValueNotNull1( $r, $k[$i%10], $derp ); if ( $x > 5 ) throw new RuntimeException('The sun might be exploding.'); } $end=microtime(true); // end timer echo 'tryGetValueNotNull1: ', substr( $end-$start, 0, 6 ), PHP_EOL; // echo results $start=microtime(true); // start timer for ( $i = 0; $i < 50000; ++$i ) { $x = tryGetValueNotNull2( $r, $k[$i%10], $derp ); if ( $x > 5 ) throw new RuntimeException('The sun might be exploding.'); } $end=microtime(true); // end timer echo 'tryGetValueNotNull2: ', substr( $end-$start, 0, 6 ), PHP_EOL; // echo results
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 7
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 26
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 60
Branch analysis from position: 60
2 jumps found. (Code = 44) Position 1 = 62, Position 2 = 45
Branch analysis from position: 62
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
2 jumps found. (Code = 44) Position 1 = 81, Position 2 = 64
Branch analysis from position: 81
1 jumps found. (Code = 42) Position 1 = 98
Branch analysis from position: 98
2 jumps found. (Code = 44) Position 1 = 100, Position 2 = 83
Branch analysis from position: 100
1 jumps found. (Code = 42) Position 1 = 121
Branch analysis from position: 121
2 jumps found. (Code = 44) Position 1 = 123, Position 2 = 106
Branch analysis from position: 123
1 jumps found. (Code = 42) Position 1 = 154
Branch analysis from position: 154
2 jumps found. (Code = 44) Position 1 = 156, Position 2 = 139
Branch analysis from position: 156
1 jumps found. (Code = 42) Position 1 = 187
Branch analysis from position: 187
2 jumps found. (Code = 44) Position 1 = 189, Position 2 = 172
Branch analysis from position: 189
1 jumps found. (Code = 42) Position 1 = 220
Branch analysis from position: 220
2 jumps found. (Code = 44) Position 1 = 222, Position 2 = 205
Branch analysis from position: 222
1 jumps found. (Code = 42) Position 1 = 253
Branch analysis from position: 253
2 jumps found. (Code = 44) Position 1 = 255, Position 2 = 238
Branch analysis from position: 255
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 238
2 jumps found. (Code = 43) Position 1 = 248, Position 2 = 252
Branch analysis from position: 248
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 252
2 jumps found. (Code = 44) Position 1 = 255, Position 2 = 238
Branch analysis from position: 255
Branch analysis from position: 238
Branch analysis from position: 205
2 jumps found. (Code = 43) Position 1 = 215, Position 2 = 219
Branch analysis from position: 215
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 219
2 jumps found. (Code = 44) Position 1 = 222, Position 2 = 205
Branch analysis from position: 222
Branch analysis from position: 205
Branch analysis from position: 172
2 jumps found. (Code = 43) Position 1 = 182, Position 2 = 186
Branch analysis from position: 182
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 186
2 jumps found. (Code = 44) Position 1 = 189, Position 2 = 172
Branch analysis from position: 189
Branch analysis from position: 172
Branch analysis from position: 139
2 jumps found. (Code = 43) Position 1 = 149, Position 2 = 153
Branch analysis from position: 149
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 153
2 jumps found. (Code = 44) Position 1 = 156, Position 2 = 139
Branch analysis from position: 156
Branch analysis from position: 139
Branch analysis from position: 106
2 jumps found. (Code = 43) Position 1 = 116, Position 2 = 120
Branch analysis from position: 116
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 120
2 jumps found. (Code = 44) Position 1 = 123, Position 2 = 106
Branch analysis from position: 123
Branch analysis from position: 106
Branch analysis from position: 83
2 jumps found. (Code = 43) Position 1 = 93, Position 2 = 97
Branch analysis from position: 93
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 97
2 jumps found. (Code = 44) Position 1 = 100, Position 2 = 83
Branch analysis from position: 100
Branch analysis from position: 83
Branch analysis from position: 64
2 jumps found. (Code = 43) Position 1 = 74, Position 2 = 78
Branch analysis from position: 74
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 78
2 jumps found. (Code = 44) Position 1 = 81, Position 2 = 64
Branch analysis from position: 81
Branch analysis from position: 64
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 59
Branch analysis from position: 55
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 59
2 jumps found. (Code = 44) Position 1 = 62, Position 2 = 45
Branch analysis from position: 62
Branch analysis from position: 45
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 40
Branch analysis from position: 36
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 26
Branch analysis from position: 43
Branch analysis from position: 26
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 7
Branch analysis from position: 24
Branch analysis from position: 7
filename:       /in/lmaPR
function name:  (null)
number of ops:  266
compiled vars:  !0 = $derp, !1 = $k, !2 = $r, !3 = $x, !4 = $i, !5 = $start, !6 = $end
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   28     0  E >   DECLARE_LAMBDA_FUNCTION                              ~7      [0]
          1        ASSIGN                                                       !0, ~7
   31     2        ASSIGN                                                       !1, <array>
   32     3        ASSIGN                                                       !2, <array>
   33     4        ASSIGN                                                       !3, 0
   37     5        ASSIGN                                                       !4, 0
          6      > JMP                                                          ->22
   38     7    >   INIT_FCALL                                                   'trygetvalue1'
          8        SEND_VAR                                                     !2
          9        MOD                                                  ~13     !4, 10
         10        FETCH_DIM_R                                          ~14     !1, ~13
         11        SEND_VAL                                                     ~14
         12        SEND_VAR                                                     !0
         13        DO_FCALL                                          0  $15     
         14        ASSIGN_OP                                        10          !3, $15
   39    15        IS_SMALLER                                                   5, !3
         16      > JMPZ                                                         ~17, ->21
         17    >   NEW                                                  $18     'RuntimeException'
         18        SEND_VAL_EX                                                  'The+sun+might+be+exploding.'
         19        DO_FCALL                                          0          
         20      > THROW                                             0          $18
   37    21    >   PRE_INC                                                      !4
         22    >   IS_SMALLER                                                   !4, 100
         23      > JMPNZ                                                        ~21, ->7
   41    24    >   ASSIGN                                                       !4, 0
         25      > JMP                                                          ->41
   42    26    >   INIT_FCALL                                                   'trygetvalue2'
         27        SEND_VAR                                                     !2
         28        MOD                                                  ~23     !4, 10
         29        FETCH_DIM_R                                          ~24     !1, ~23
         30        SEND_VAL                                                     ~24
         31        SEND_VAR                                                     !0
         32        DO_FCALL                                          0  $25     
         33        ASSIGN_OP                                        10          !3, $25
   43    34        IS_SMALLER                                                   5, !3
         35      > JMPZ                                                         ~27, ->40
         36    >   NEW                                                  $28     'RuntimeException'
         37        SEND_VAL_EX                                                  'The+sun+might+be+exploding.'
         38        DO_FCALL                                          0          
         39      > THROW                                             0          $28
   41    40    >   PRE_INC                                                      !4
         41    >   IS_SMALLER                                                   !4, 100
         42      > JMPNZ                                                        ~31, ->26
   45    43    >   ASSIGN                                                       !4, 0
         44      > JMP                                                          ->60
   46    45    >   INIT_FCALL                                                   'trygetvalue3'
         46        SEND_VAR                                                     !2
         47        MOD                                                  ~33     !4, 10
         48        FETCH_DIM_R                                          ~34     !1, ~33
         49        SEND_VAL                                                     ~34
         50        SEND_VAR                                                     !0
         51        DO_FCALL                                          0  $35     
         52        ASSIGN_OP                                        10          !3, $35
   47    53        IS_SMALLER                                                   5, !3
         54      > JMPZ                                                         ~37, ->59
         55    >   NEW                                                  $38     'RuntimeException'
         56        SEND_VAL_EX                                                  'The+sun+might+be+exploding.'
         57        DO_FCALL                                          0          
         58      > THROW                                             0          $38
   45    59    >   PRE_INC                                                      !4
         60    >   IS_SMALLER                                                   !4, 100
         61      > JMPNZ                                                        ~41, ->45
   49    62    >   ASSIGN                                                       !4, 0
         63      > JMP                                                          ->79
   50    64    >   INIT_FCALL                                                   'trygetvaluenotnull1'
         65        SEND_VAR                                                     !2
         66        MOD                                                  ~43     !4, 10
         67        FETCH_DIM_R                                          ~44     !1, ~43
         68        SEND_VAL                                                     ~44
         69        SEND_VAR                                                     !0
         70        DO_FCALL                                          0  $45     
         71        ASSIGN_OP                                        10          !3, $45
   51    72        IS_SMALLER                                                   5, !3
         73      > JMPZ                                                         ~47, ->78
         74    >   NEW                                                  $48     'RuntimeException'
         75        SEND_VAL_EX                                                  'The+sun+might+be+exploding.'
         76        DO_FCALL                                          0          
         77      > THROW                                             0          $48
   49    78    >   PRE_INC                                                      !4
         79    >   IS_SMALLER                                                   !4, 100
         80      > JMPNZ                                                        ~51, ->64
   53    81    >   ASSIGN                                                       !4, 0
         82      > JMP                                                          ->98
   54    83    >   INIT_FCALL                                                   'trygetvaluenotnull2'
         84        SEND_VAR                                                     !2
         85        MOD                                                  ~53     !4, 10
         86        FETCH_DIM_R                                          ~54     !1, ~53
         87        SEND_VAL                                                     ~54
         88        SEND_VAR                                                     !0
         89        DO_FCALL                                          0  $55     
         90        ASSIGN_OP                                        10          !3, $55
   55    91        IS_SMALLER                                                   5, !3
         92      > JMPZ                                                         ~57, ->97
         93    >   NEW                                                  $58     'RuntimeException'
         94        SEND_VAL_EX                                                  'The+sun+might+be+exploding.'
         95        DO_FCALL                                          0          
         96      > THROW                                             0          $58
   53    97    >   PRE_INC                                                      !4
         98    >   IS_SMALLER                                                   !4, 100
         99      > JMPNZ                                                        ~61, ->83
   59   100    >   INIT_FCALL                                                   'microtime'
        101        SEND_VAL                                                     <true>
        102        DO_ICALL                                             $62     
        103        ASSIGN                                                       !5, $62
   61   104        ASSIGN                                                       !4, 0
        105      > JMP                                                          ->121
   62   106    >   INIT_FCALL                                                   'trygetvalue1'
        107        SEND_VAR                                                     !2
        108        MOD                                                  ~65     !4, 10
        109        FETCH_DIM_R                                          ~66     !1, ~65
        110        SEND_VAL                                                     ~66
        111        SEND_VAR                                                     !0
        112        DO_FCALL                                          0  $67     
        113        ASSIGN                                                       !3, $67
   63   114        IS_SMALLER                                                   5, !3
        115      > JMPZ                                                         ~69, ->120
        116    >   NEW                                                  $70     'RuntimeException'
        117        SEND_VAL_EX                                                  'The+sun+might+be+exploding.'
        118        DO_FCALL                                          0          
        119      > THROW                                             0          $70
   61   120    >   PRE_INC                                                      !4
        121    >   IS_SMALLER                                                   !4, 50000
        122      > JMPNZ                                                        ~73, ->106
   66   123    >   INIT_FCALL                                                   'microtime'
        124        SEND_VAL                                                     <true>
        125        DO_ICALL                                             $74     
        126        ASSIGN                                                       !6, $74
   67   127        ECHO                                                         'tryGetValue1%3A+'
        128        SUB                                                  ~76     !6, !5
        129        FRAMELESS_ICALL_3                substr              ~77     ~76, 0
        130        OP_DATA                                                      6
        131        ECHO                                                         ~77
        132        ECHO                                                         '%0A'
   70   133        INIT_FCALL                                                   'microtime'
        134        SEND_VAL                                                     <true>
        135        DO_ICALL                                             $78     
        136        ASSIGN                                                       !5, $78
   72   137        ASSIGN                                                       !4, 0
        138      > JMP                                                          ->154
   73   139    >   INIT_FCALL                                                   'trygetvalue2'
        140        SEND_VAR                                                     !2
        141        MOD                                                  ~81     !4, 10
        142        FETCH_DIM_R                                          ~82     !1, ~81
        143        SEND_VAL                                                     ~82
        144        SEND_VAR                                                     !0
        145        DO_FCALL                                          0  $83     
        146        ASSIGN                                                       !3, $83
   74   147        IS_SMALLER                                                   5, !3
        148      > JMPZ                                                         ~85, ->153
        149    >   NEW                                                  $86     'RuntimeException'
        150        SEND_VAL_EX                                                  'The+sun+might+be+exploding.'
        151        DO_FCALL                                          0          
        152      > THROW                                             0          $86
   72   153    >   PRE_INC                                                      !4
        154    >   IS_SMALLER                                                   !4, 50000
        155      > JMPNZ                                                        ~89, ->139
   77   156    >   INIT_FCALL                                                   'microtime'
        157        SEND_VAL                                                     <true>
        158        DO_ICALL                                             $90     
        159        ASSIGN                                                       !6, $90
   78   160        ECHO                                                         'tryGetValue2%3A+'
        161        SUB                                                  ~92     !6, !5
        162        FRAMELESS_ICALL_3                substr              ~93     ~92, 0
        163        OP_DATA                                                      6
        164        ECHO                                                         ~93
        165        ECHO                                                         '%0A'
   81   166        INIT_FCALL                                                   'microtime'
        167        SEND_VAL                                                     <true>
        168        DO_ICALL                                             $94     
        169        ASSIGN                                                       !5, $94
   83   170        ASSIGN                                                       !4, 0
        171      > JMP                                                          ->187
   84   172    >   INIT_FCALL                                                   'trygetvalue3'
        173        SEND_VAR                                                     !2
        174        MOD                                                  ~97     !4, 10
        175        FETCH_DIM_R                                          ~98     !1, ~97
        176        SEND_VAL                                                     ~98
        177        SEND_VAR                                                     !0
        178        DO_FCALL                                          0  $99     
        179        ASSIGN                                                       !3, $99
   85   180        IS_SMALLER                                                   5, !3
        181      > JMPZ                                                         ~101, ->186
        182    >   NEW                                                  $102    'RuntimeException'
        183        SEND_VAL_EX                                                  'The+sun+might+be+exploding.'
        184        DO_FCALL                                          0          
        185      > THROW                                             0          $102
   83   186    >   PRE_INC                                                      !4
        187    >   IS_SMALLER                                                   !4, 50000
        188      > JMPNZ                                                        ~105, ->172
   88   189    >   INIT_FCALL                                                   'microtime'
        190        SEND_VAL                                                     <true>
        191        DO_ICALL                                             $106    
        192        ASSIGN                                                       !6, $106
   89   193        ECHO                                                         'tryGetValue3%3A+'
        194        SUB                                                  ~108    !6, !5
        195        FRAMELESS_ICALL_3                substr              ~109    ~108, 0
        196        OP_DATA                                                      6
        197        ECHO                                                         ~109
        198        ECHO                                                         '%0A'
   92   199        INIT_FCALL                                                   'microtime'
        200        SEND_VAL                                                     <true>
        201        DO_ICALL                                             $110    
        202        ASSIGN                                                       !5, $110
   94   203        ASSIGN                                                       !4, 0
        204      > JMP                                                          ->220
   95   205    >   INIT_FCALL                                                   'trygetvaluenotnull1'
        206        SEND_VAR                                                     !2
        207        MOD                                                  ~113    !4, 10
        208        FETCH_DIM_R                                          ~114    !1, ~113
        209        SEND_VAL                                                     ~114
        210        SEND_VAR                                                     !0
        211        DO_FCALL                                          0  $115    
        212        ASSIGN                                                       !3, $115
   96   213        IS_SMALLER                                                   5, !3
        214      > JMPZ                                                         ~117, ->219
        215    >   NEW                                                  $118    'RuntimeException'
        216        SEND_VAL_EX                                                  'The+sun+might+be+exploding.'
        217        DO_FCALL                                          0          
        218      > THROW                                             0          $118
   94   219    >   PRE_INC                                                      !4
        220    >   IS_SMALLER                                                   !4, 50000
        221      > JMPNZ                                                        ~121, ->205
   99   222    >   INIT_FCALL                                                   'microtime'
        223        SEND_VAL                                                     <true>
        224        DO_ICALL                                             $122    
        225        ASSIGN                                                       !6, $122
  100   226        ECHO                                                         'tryGetValueNotNull1%3A+'
        227        SUB                                                  ~124    !6, !5
        228        FRAMELESS_ICALL_3                substr              ~125    ~124, 0
        229        OP_DATA                                                      6
        230        ECHO                                                         ~125
        231        ECHO                                                         '%0A'
  103   232        INIT_FCALL                                                   'microtime'
        233        SEND_VAL                                                     <true>
        234        DO_ICALL                                             $126    
        235        ASSIGN                                                       !5, $126
  105   236        ASSIGN                                                       !4, 0
        237      > JMP                                                          ->253
  106   238    >   INIT_FCALL                                                   'trygetvaluenotnull2'
        239        SEND_VAR                                                     !2
        240        MOD                                                  ~129    !4, 10
        241        FETCH_DIM_R                                          ~130    !1, ~129
        242        SEND_VAL                                                     ~130
        243        SEND_VAR                                                     !0
        244        DO_FCALL                                          0  $131    
        245        ASSIGN                                                       !3, $131
  107   246        IS_SMALLER                                                   5, !3
        247      > JMPZ                                                         ~133, ->252
        248    >   NEW                                                  $134    'RuntimeException'
        249        SEND_VAL_EX                                                  'The+sun+might+be+exploding.'
        250        DO_FCALL                                          0          
        251      > THROW                                             0          $134
  105   252    >   PRE_INC                                                      !4
        253    >   IS_SMALLER                                                   !4, 50000
        254      > JMPNZ                                                        ~137, ->238
  110   255    >   INIT_FCALL                                                   'microtime'
        256        SEND_VAL                                                     <true>
        257        DO_ICALL                                             $138    
        258        ASSIGN                                                       !6, $138
  111   259        ECHO                                                         'tryGetValueNotNull2%3A+'
        260        SUB                                                  ~140    !6, !5
        261        FRAMELESS_ICALL_3                substr              ~141    ~140, 0
        262        OP_DATA                                                      6
        263        ECHO                                                         ~141
        264        ECHO                                                         '%0A'
        265      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lmaPR
function name:  {closure:/in/lmaPR:28}
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   28     0  E > > RETURN                                                       0
          1*     > RETURN                                                       null

End of Dynamic Function 0

Function trygetvalue1:
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/lmaPR
function name:  tryGetValue1
number of ops:  13
compiled vars:  !0 = $array, !1 = $key, !2 = $default
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
    4     3        ARRAY_KEY_EXISTS                                             !1, !0
          4      > JMPZ                                                         ~3, ->8
    5     5    >   FETCH_DIM_R                                          ~4      !0, !1
          6        QM_ASSIGN                                            ~5      ~4
          7      > JMP                                                          ->11
          8    >   INIT_DYNAMIC_CALL                                            !2
          9        DO_FCALL                                          0  $6      
         10        QM_ASSIGN                                            ~5      $6
         11    > > RETURN                                                       ~5
    6    12*     > RETURN                                                       null

End of function trygetvalue1

Function trygetvalue2:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/lmaPR
function name:  tryGetValue2
number of ops:  19
compiled vars:  !0 = $array, !1 = $key, !2 = $default, !3 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
    9     3        BEGIN_SILENCE                                        ~4      
          4        FETCH_DIM_R                                          ~5      !0, !1
          5        END_SILENCE                                                  ~4
          6        ASSIGN                                               ~6      !3, ~5
      

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
148.16 ms | 1483 KiB | 24 Q