3v4l.org

run code in 300+ PHP versions simultaneously
<?php Route::filter('api_key', function () { if (Input::has("api_key") == FALSE) { throw new MyAltCoins\Exceptions\Api\ApiKeyInvalidException(); } $user = User::where('apiKey', Input::get('api_key'))->first(); if (!$user) { throw new MyAltCoins\Exceptions\Api\ApiKeyInvalidException(); } Auth::login($user); });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dgN4t
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_STATIC_METHOD_CALL                                  'Route', 'filter'
          1        SEND_VAL_EX                                              'api_key'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FdgN4t%3A2%240'
   11     3        SEND_VAL_EX                                              ~0
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FdgN4t%3A2%240:
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 = 108) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 23
Branch analysis from position: 20
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dgN4t
function name:  {closure}
number of ops:  27
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                  'Input', 'has'
          1        SEND_VAL_EX                                              'api_key'
          2        DO_FCALL                                      0  $1      
          3        BOOL_NOT                                         ~2      $1
          4      > JMPZ                                                     ~2, ->8
    4     5    >   NEW                                              $3      'MyAltCoins%5CExceptions%5CApi%5CApiKeyInvalidException'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $3
    6     8    >   INIT_STATIC_METHOD_CALL                                  'User', 'where'
          9        SEND_VAL_EX                                              'apiKey'
         10        INIT_STATIC_METHOD_CALL                                  'Input', 'get'
         11        SEND_VAL_EX                                              'api_key'
         12        DO_FCALL                                      0  $5      
         13        SEND_VAR_NO_REF_EX                                       $5
         14        DO_FCALL                                      0  $6      
         15        INIT_METHOD_CALL                                         $6, 'first'
         16        DO_FCALL                                      0  $7      
         17        ASSIGN                                                   !0, $7
    7    18        BOOL_NOT                                         ~9      !0
         19      > JMPZ                                                     ~9, ->23
    8    20    >   NEW                                              $10     'MyAltCoins%5CExceptions%5CApi%5CApiKeyInvalidException'
         21        DO_FCALL                                      0          
         22      > THROW                                         0          $10
   10    23    >   INIT_STATIC_METHOD_CALL                                  'Auth', 'login'
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0          
   11    26      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FdgN4t%3A2%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.95 ms | 1395 KiB | 13 Q