3v4l.org

run code in 300+ 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 = 157
Branch analysis from position: 157
2 jumps found. (Code = 44) Position 1 = 159, Position 2 = 142
Branch analysis from position: 159
1 jumps found. (Code = 42) Position 1 = 193
Branch analysis from position: 193
2 jumps found. (Code = 44) Position 1 = 195, Position 2 = 178
Branch analysis from position: 195
1 jumps found. (Code = 42) Position 1 = 229
Branch analysis from position: 229
2 jumps found. (Code = 44) Position 1 = 231, Position 2 = 214
Branch analysis from position: 231
1 jumps found. (Code = 42) Position 1 = 265
Branch analysis from position: 265
2 jumps found. (Code = 44) Position 1 = 267, Position 2 = 250
Branch analysis from position: 267
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 250
2 jumps found. (Code = 43) Position 1 = 260, Position 2 = 264
Branch analysis from position: 260
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 264
2 jumps found. (Code = 44) Position 1 = 267, Position 2 = 250
Branch analysis from position: 267
Branch analysis from position: 250
Branch analysis from position: 214
2 jumps found. (Code = 43) Position 1 = 224, Position 2 = 228
Branch analysis from position: 224
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 228
2 jumps found. (Code = 44) Position 1 = 231, Position 2 = 214
Branch analysis from position: 231
Branch analysis from position: 214
Branch analysis from position: 178
2 jumps found. (Code = 43) Position 1 = 188, Position 2 = 192
Branch analysis from position: 188
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 192
2 jumps found. (Code = 44) Position 1 = 195, Position 2 = 178
Branch analysis from position: 195
Branch analysis from position: 178
Branch analysis from position: 142
2 jumps found. (Code = 43) Position 1 = 152, Position 2 = 156
Branch analysis from position: 152
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 156
2 jumps found. (Code = 44) Position 1 = 159, Position 2 = 142
Branch analysis from position: 159
Branch analysis from position: 142
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:  281
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        INIT_FCALL                                               'substr'
        129        SUB                                              ~76     !6, !5
        130        SEND_VAL                                                 ~76
        131        SEND_VAL                                                 0
        132        SEND_VAL                                                 6
        133        DO_ICALL                                         $77     
        134        ECHO                                                     $77
        135        ECHO                                                     '%0A'
   70   136        INIT_FCALL                                               'microtime'
        137        SEND_VAL                                                 <true>
        138        DO_ICALL                                         $78     
        139        ASSIGN                                                   !5, $78
   72   140        ASSIGN                                                   !4, 0
        141      > JMP                                                      ->157
   73   142    >   INIT_FCALL                                               'trygetvalue2'
        143        SEND_VAR                                                 !2
        144        MOD                                              ~81     !4, 10
        145        FETCH_DIM_R                                      ~82     !1, ~81
        146        SEND_VAL                                                 ~82
        147        SEND_VAR                                                 !0
        148        DO_FCALL                                      0  $83     
        149        ASSIGN                                                   !3, $83
   74   150        IS_SMALLER                                               5, !3
        151      > JMPZ                                                     ~85, ->156
        152    >   NEW                                              $86     'RuntimeException'
        153        SEND_VAL_EX                                              'The+sun+might+be+exploding.'
        154        DO_FCALL                                      0          
        155      > THROW                                         0          $86
   72   156    >   PRE_INC                                                  !4
        157    >   IS_SMALLER                                               !4, 50000
        158      > JMPNZ                                                    ~89, ->142
   77   159    >   INIT_FCALL                                               'microtime'
        160        SEND_VAL                                                 <true>
        161        DO_ICALL                                         $90     
        162        ASSIGN                                                   !6, $90
   78   163        ECHO                                                     'tryGetValue2%3A+'
        164        INIT_FCALL                                               'substr'
        165        SUB                                              ~92     !6, !5
        166        SEND_VAL                                                 ~92
        167        SEND_VAL                                                 0
        168        SEND_VAL                                                 6
        169        DO_ICALL                                         $93     
        170        ECHO                                                     $93
        171        ECHO                                                     '%0A'
   81   172        INIT_FCALL                                               'microtime'
        173        SEND_VAL                                                 <true>
        174        DO_ICALL                                         $94     
        175        ASSIGN                                                   !5, $94
   83   176        ASSIGN                                                   !4, 0
        177      > JMP                                                      ->193
   84   178    >   INIT_FCALL                                               'trygetvalue3'
        179        SEND_VAR                                                 !2
        180        MOD                                              ~97     !4, 10
        181        FETCH_DIM_R                                      ~98     !1, ~97
        182        SEND_VAL                                                 ~98
        183        SEND_VAR                                                 !0
        184        DO_FCALL                                      0  $99     
        185        ASSIGN                                                   !3, $99
   85   186        IS_SMALLER                                               5, !3
        187      > JMPZ                                                     ~101, ->192
        188    >   NEW                                              $102    'RuntimeException'
        189        SEND_VAL_EX                                              'The+sun+might+be+exploding.'
        190        DO_FCALL                                      0          
        191      > THROW                                         0          $102
   83   192    >   PRE_INC                                                  !4
        193    >   IS_SMALLER                                               !4, 50000
        194      > JMPNZ                                                    ~105, ->178
   88   195    >   INIT_FCALL                                               'microtime'
        196        SEND_VAL                                                 <true>
        197        DO_ICALL                                         $106    
        198        ASSIGN                                                   !6, $106
   89   199        ECHO                                                     'tryGetValue3%3A+'
        200        INIT_FCALL                                               'substr'
        201        SUB                                              ~108    !6, !5
        202        SEND_VAL                                                 ~108
        203        SEND_VAL                                                 0
        204        SEND_VAL                                                 6
        205        DO_ICALL                                         $109    
        206        ECHO                                                     $109
        207        ECHO                                                     '%0A'
   92   208        INIT_FCALL                                               'microtime'
        209        SEND_VAL                                                 <true>
        210        DO_ICALL                                         $110    
        211        ASSIGN                                                   !5, $110
   94   212        ASSIGN                                                   !4, 0
        213      > JMP                                                      ->229
   95   214    >   INIT_FCALL                                               'trygetvaluenotnull1'
        215        SEND_VAR                                                 !2
        216        MOD                                              ~113    !4, 10
        217        FETCH_DIM_R                                      ~114    !1, ~113
        218        SEND_VAL                                                 ~114
        219        SEND_VAR                                                 !0
        220        DO_FCALL                                      0  $115    
        221        ASSIGN                                                   !3, $115
   96   222        IS_SMALLER                                               5, !3
        223      > JMPZ                                                     ~117, ->228
        224    >   NEW                                              $118    'RuntimeException'
        225        SEND_VAL_EX                                              'The+sun+might+be+exploding.'
        226        DO_FCALL                                      0          
        227      > THROW                                         0          $118
   94   228    >   PRE_INC                                                  !4
        229    >   IS_SMALLER                                               !4, 50000
        230      > JMPNZ                                                    ~121, ->214
   99   231    >   INIT_FCALL                                               'microtime'
        232        SEND_VAL                                                 <true>
        233        DO_ICALL                                         $122    
        234        ASSIGN                                                   !6, $122
  100   235        ECHO                                                     'tryGetValueNotNull1%3A+'
        236        INIT_FCALL                                               'substr'
        237        SUB                                              ~124    !6, !5
        238        SEND_VAL                                                 ~124
        239        SEND_VAL                                                 0
        240        SEND_VAL                                                 6
        241        DO_ICALL                                         $125    
        242        ECHO                                                     $125
        243        ECHO                                                     '%0A'
  103   244        INIT_FCALL                                               'microtime'
        245        SEND_VAL                                                 <true>
        246        DO_ICALL                                         $126    
        247        ASSIGN                                                   !5, $126
  105   248        ASSIGN                                                   !4, 0
        249      > JMP                                                      ->265
  106   250    >   INIT_FCALL                                               'trygetvaluenotnull2'
        251        SEND_VAR                                                 !2
        252        MOD                                              ~129    !4, 10
        253        FETCH_DIM_R                                      ~130    !1, ~129
        254        SEND_VAL                                                 ~130
        255        SEND_VAR                                                 !0
        256        DO_FCALL                                      0  $131    
        257        ASSIGN                                                   !3, $131
  107   258        IS_SMALLER                                               5, !3
        259      > JMPZ                                                     ~133, ->264
        260    >   NEW                                              $134    'RuntimeException'
        261        SEND_VAL_EX                                              'The+sun+might+be+exploding.'
        262        DO_FCALL                                      0          
        263      > THROW                                         0          $134
  105   264    >   PRE_INC                                                  !4
        265    >   IS_SMALLER                                               !4, 50000
        266      > JMPNZ                                                    ~137, ->250
  110   267    >   INIT_FCALL                                               'microtime'
        268        SEND_VAL                                                 <true>
        269        DO_ICALL                                         $138    
        270        ASSIGN                                                   !6, $138
  111   271        ECHO                                                     'tryGetValueNotNull2%3A+'
        272        INIT_FCALL                                               'substr'
        273        SUB                                              ~140    !6, !5
        274        SEND_VAL                                                 ~140
        275        SEND_VAL                                                 0
        276        SEND_VAL                                                 6
        277        DO_ICALL                                         $141    
        278        ECHO                                                     $141
        279        ECHO                                                     '%0A'
        280      > 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}
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
          7   

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.34 ms | 1108 KiB | 25 Q