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 = 7, Position 2 = 10
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 10
Found catch point at position: 21
Branch analysis from position: 21
2 jumps found. (Code = 107) Position 1 = 22, Position 2 = -2
Branch analysis from position: 22
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/bmK3c
function name:  (null)
number of ops:  24
compiled vars:  !0 = $paypal, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'paypal%5Cpaypalexperience', 'antiquated%5Capi'
   34     1        NEW                                              $2      'Paypal%5CPaypalExperience'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   37     4        INIT_METHOD_CALL                                         !0, 'canUpdate'
          5        DO_FCALL                                      0  $5      
          6      > JMPZ_EX                                          ~6      $5, ->10
          7    >   INIT_METHOD_CALL                                         !0, 'isIntuitive'
          8        DO_FCALL                                      0  $7      
          9        BOOL                                             ~6      $7
         10    > > JMPZ                                                     ~6, ->17
   38    11    >   INIT_NS_FCALL_BY_NAME                                    'Paypal%5Ccall_user_func'
         12        DECLARE_LAMBDA_FUNCTION                                  '%00paypal%5C%7Bclosure%7D%2Fin%2FbmK3c%3A38%241'
         13        BIND_LEXICAL                                             ~8, !0
   40    14        SEND_VAL_EX                                              ~8
         15        DO_FCALL                                      0          
         16      > JMP                                                      ->20
   42    17    >   INIT_METHOD_CALL                                         !0, 'setIsGarbage'
         18        SEND_VAL_EX                                              <true>
         19        DO_FCALL                                      0          
         20    > > JMP                                                      ->23
   44    21  E > > CATCH                                       last         'Paypal%5CPaypalInconsistencyException'
   45    22    > > EXIT                                                     'Wait%2C+what+the+fuck%3F'
   46    23    > > RETURN                                                   1

Function %00paypal%5C%7Bclosure%7D%2Fin%2FbmK3c%3A38%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bmK3c
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%2FbmK3c%3A38%241

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/bmK3c
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/bmK3c
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/bmK3c
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/bmK3c
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/bmK3c
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:
161.18 ms | 1405 KiB | 15 Q