3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TiroNaCara extends Exception { public function __construct($grito){ parent::__construct("Você levou tiro na cara: " . strtoupper($grito)); } } class LojaDeCrack { private $pacotes = array(); private function checarPacotes($oQueFazer){ $pacotes = $this -> pacotes; foreach($pacotes as $pedraDoPacote) $oQueFazer($pedraDoPacote); } public function __construct($pacotes){ if(gettype($pacotes) == "array" && !empty($pacotes)){ checarPacotes(function($pedraDoPacote){ if(!is_numeric($pedraDoPacote)) throw new TiroNaCara("CLIENTE BURRO DO CARALHUDO DE UMAS ARÁBIAS! AFF"); }); $this -> pacotes = $pacotes; }else throw new TiroNaCara("TEM ALGO DE ERRADO COM OS MEUS PACOTES... SEU CRACKUDO FILHO DA PUTA!"); } public function comprarPedra($pedras){ if(is_numeric($pedras)){ $pacotes = $this -> pacotes; foreach($pacotes as $pedraDoPacote){ if($pedraDoPacote <= $pedras){ $resto = $pedras%$pedraDoPacote; if($resto) comprarPedra($resto); } } }else throw new TiroNaCara("TA ME TIRANDO, FILHO DA PUTA?!"); } } try{ $crack = new LojaDeCrack(array(20, 10, 7, '')); }catch(Exception $e){ echo $e -> getMessage(); } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 5
Branch analysis from position: 5
2 jumps found. (Code = 107) Position 1 = 6, Position 2 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SCdDG
function name:  (null)
number of ops:  10
compiled vars:  !0 = $crack, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   43     0  E >   NEW                                              $2      'LojaDeCrack'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
          4      > JMP                                                      ->9
   44     5  E > > CATCH                                       last         'Exception'
   45     6    >   INIT_METHOD_CALL                                         !1, 'getMessage'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
   47     9    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FSCdDG%3A18%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SCdDG
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $pedraDoPacote
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        INIT_FCALL                                               'is_numeric'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        BOOL_NOT                                         ~2      $1
          5      > JMPZ                                                     ~2, ->10
   20     6    >   NEW                                              $3      'TiroNaCara'
          7        SEND_VAL_EX                                              'CLIENTE+BURRO+DO+CARALHUDO+DE+UMAS+AR%C3%81BIAS%21+AFF'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $3
   21    10    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FSCdDG%3A18%240

Class TiroNaCara:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SCdDG
function name:  __construct
number of ops:  9
compiled vars:  !0 = $grito
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_STATIC_METHOD_CALL                                  
          2        INIT_FCALL                                               'strtoupper'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        CONCAT                                           ~2      'Voc%C3%AA+levou+tiro+na+cara%3A+', $1
          6        SEND_VAL_EX                                              ~2
          7        DO_FCALL                                      0          
    5     8      > RETURN                                                   null

End of function __construct

End of class TiroNaCara.

Class LojaDeCrack:
Function checarpacotes:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/SCdDG
function name:  checarPacotes
number of ops:  11
compiled vars:  !0 = $oQueFazer, !1 = $pacotes, !2 = $pedraDoPacote
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        FETCH_OBJ_R                                      ~3      'pacotes'
          2        ASSIGN                                                   !1, ~3
   12     3      > FE_RESET_R                                       $5      !1, ->9
          4    > > FE_FETCH_R                                               $5, !2, ->9
   13     5    >   INIT_DYNAMIC_CALL                                        !0
          6        SEND_VAR_EX                                              !2
          7        DO_FCALL                                      0          
   12     8      > JMP                                                      ->4
          9    >   FE_FREE                                                  $5
   14    10      > RETURN                                                   null

End of function checarpacotes

Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
filename:       /in/SCdDG
function name:  __construct
number of ops:  20
compiled vars:  !0 = $pacotes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        GET_TYPE                                         ~1      !0
          2        IS_EQUAL                                         ~2      ~1, 'array'
          3      > JMPZ_EX                                          ~2      ~2, ->7
          4    >   ISSET_ISEMPTY_CV                                 ~3      !0
          5        BOOL_NOT                                         ~4      ~3
          6        BOOL                                             ~2      ~4
          7    > > JMPZ                                                     ~2, ->15
   18     8    >   INIT_FCALL_BY_NAME                                       'checarPacotes'
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FSCdDG%3A18%240'
   21    10        SEND_VAL_EX                                              ~5
         11        DO_FCALL                                      0          
   22    12        ASSIGN_OBJ                                               'pacotes'
         13        OP_DATA                                                  !0
         14      > JMP                                                      ->19
   24    15    >   NEW                                              $8      'TiroNaCara'
         16        SEND_VAL_EX                                              'TEM+ALGO+DE+ERRADO+COM+OS+MEUS+PACOTES...+SEU+CRACKUDO+FILHO+DA+PUTA%21'
         17        DO_FCALL                                      0          
         18      > THROW                                         0          $8
   25    19    > > RETURN                                                   null

End of function __construct

Function comprarpedra:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 20
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 18
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 17
Branch analysis from position: 17
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 20
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/SCdDG
function name:  comprarPedra
number of ops:  25
compiled vars:  !0 = $pedras, !1 = $pacotes, !2 = $pedraDoPacote, !3 = $resto
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   28     1        INIT_FCALL                                               'is_numeric'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4      > JMPZ                                                     $4, ->20
   29     5    >   FETCH_OBJ_R                                      ~5      'pacotes'
          6        ASSIGN                                                   !1, ~5
   30     7      > FE_RESET_R                                       $7      !1, ->18
          8    > > FE_FETCH_R                                               $7, !2, ->18
   31     9    >   IS_SMALLER_OR_EQUAL                                      !2, !0
         10      > JMPZ                                                     ~8, ->17
   32    11    >   MOD                                              ~9      !0, !2
         12        ASSIGN                                                   !3, ~9
   33    13      > JMPZ                                                     !3, ->17
   34    14    >   INIT_FCALL_BY_NAME                                       'comprarPedra'
         15        SEND_VAR_EX                                              !3
         16        DO_FCALL                                      0          
   30    17    > > JMP                                                      ->8
         18    >   FE_FREE                                                  $7
         19      > JMP                                                      ->24
   38    20    >   NEW                                              $12     'TiroNaCara'
         21        SEND_VAL_EX                                              'TA+ME+TIRANDO%2C+FILHO+DA+PUTA%3F%21'
         22        DO_FCALL                                      0          
         23      > THROW                                         0          $12
   39    24    > > RETURN                                                   null

End of function comprarpedra

End of class LojaDeCrack.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.25 ms | 1404 KiB | 17 Q