3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Paypal; use \Antiquated\API as PaypalsShittyAPI; class PaypalIsShittyException extends Exception {} class PaypalInconsistencyException extends PaypalIsShittyException {} class PaypalExperience extends PaypalsShittyAPI { protected $garbage; public function isGarbage() { return $this->garbage; } public function setIsGarbage($garbage) { $this->garbage = $garbage; } public function canUpdate() { return false; } public function isIntuitive() { throw new PaypalInconsistencyException('lol'); } public function makeMoney() { throw new PaypalIsShittyException('This feature is unsupported.'); } } $paypal = new PaypalExperience; try { if ($paypal->canUpdate() && $paypal->isIntuitive()) { call_user_func(function() use ($paypal) { return $paypal->makeMoney(); }); } else { $paypal->setIsGarbage(true); } } catch(PaypalInconsistencyException $e) { die('Wait, what the fuck?'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
Branch analysis from position: 12
Found catch point at position: 23
Branch analysis from position: 23
2 jumps found. (Code = 107) Position 1 = 24, Position 2 = -2
Branch analysis from position: 24
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/NN6FC
function name:  (null)
number of ops:  26
compiled vars:  !0 = $paypal, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'paypal%5Cpaypalisshittyexception', 'paypal%5Cexception'
    7     1        DECLARE_CLASS                                            'paypal%5Cpaypalinconsistencyexception', 'paypal%5Cpaypalisshittyexception'
    8     2        DECLARE_CLASS                                            'paypal%5Cpaypalexperience', 'antiquated%5Capi'
   34     3        NEW                                              $2      'Paypal%5CPaypalExperience'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   37     6        INIT_METHOD_CALL                                         !0, 'canUpdate'
          7        DO_FCALL                                      0  $5      
          8      > JMPZ_EX                                          ~6      $5, ->12
          9    >   INIT_METHOD_CALL                                         !0, 'isIntuitive'
         10        DO_FCALL                                      0  $7      
         11        BOOL                                             ~6      $7
         12    > > JMPZ                                                     ~6, ->19
   38    13    >   INIT_NS_FCALL_BY_NAME                                    'Paypal%5Ccall_user_func'
         14        DECLARE_LAMBDA_FUNCTION                                  '%00paypal%5C%7Bclosure%7D%2Fin%2FNN6FC%3A38%243'
         15        BIND_LEXICAL                                             ~8, !0
   40    16        SEND_VAL_EX                                              ~8
         17        DO_FCALL                                      0          
         18      > JMP                                                      ->22
   42    19    >   INIT_METHOD_CALL                                         !0, 'setIsGarbage'
         20        SEND_VAL_EX                                              <true>
         21        DO_FCALL                                      0          
         22    > > JMP                                                      ->25
   44    23  E > > CATCH                                       last         'Paypal%5CPaypalInconsistencyException'
   45    24    > > EXIT                                                     'Wait%2C+what+the+fuck%3F'
   46    25    > > RETURN                                                   1

Function %00paypal%5C%7Bclosure%7D%2Fin%2FNN6FC%3A38%243:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NN6FC
function name:  Paypal\{closure}
number of ops:  5
compiled vars:  !0 = $paypal
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   BIND_STATIC                                              !0
   39     1        INIT_METHOD_CALL                                         !0, 'makeMoney'
          2        DO_FCALL                                      0  $1      
          3      > RETURN                                                   $1
   40     4*     > RETURN                                                   null

End of function %00paypal%5C%7Bclosure%7D%2Fin%2FNN6FC%3A38%243

Class Paypal\PaypalIsShittyException: [no user functions]
Class Paypal\PaypalInconsistencyException: [no user functions]
Class Paypal\PaypalExperience:
Function isgarbage:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NN6FC
function name:  isGarbage
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'garbage'
          1      > RETURN                                                   ~0
   14     2*     > RETURN                                                   null

End of function isgarbage

Function setisgarbage:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NN6FC
function name:  setIsGarbage
number of ops:  4
compiled vars:  !0 = $garbage
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        ASSIGN_OBJ                                               'garbage'
          2        OP_DATA                                                  !0
   18     3      > RETURN                                                   null

End of function setisgarbage

Function canupdate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NN6FC
function name:  canUpdate
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E > > RETURN                                                   <false>
   22     1*     > RETURN                                                   null

End of function canupdate

Function isintuitive:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/NN6FC
function name:  isIntuitive
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $0      'Paypal%5CPaypalInconsistencyException'
          1        SEND_VAL_EX                                              'lol'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
   26     4*     > RETURN                                                   null

End of function isintuitive

Function makemoney:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/NN6FC
function name:  makeMoney
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $0      'Paypal%5CPaypalIsShittyException'
          1        SEND_VAL_EX                                              'This+feature+is+unsupported.'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
   30     4*     > RETURN                                                   null

End of function makemoney

End of class Paypal\PaypalExperience.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.64 ms | 1404 KiB | 15 Q