3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SomeException extends Exception { } function getDomain() { return 'example.com'; } function getSubDomains() { return array('www.example.com'); } function register($domainKeys, $subdomains) { $domains = (array) getDomain(); if ($subdomains == null) { $domains = array_merge($domains, getSubdomains()); } else { $domains = array_merge($domains, $subdomains); } $san = implode(",", array_map(function ($dns) { return "DNS:" . $dns; }, $domains)); throw new SomeException("yo"); return $domains; } function register2($domainKeys, $subdomains) { try { register($domainKeys, $subdomains); } catch(Exception $e) { throw new Exception("exception gevangen: " . $e->getMessage(), $e->getCode(), $e); } } var_dump(register2(null, (array)$nonset));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S58v5
function name:  (null)
number of ops:  9
compiled vars:  !0 = $nonset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   35     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'register2'
          2        SEND_VAL                                                 null
          3        CAST                                          7  ~1      !0
          4        SEND_VAL                                                 ~1
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function getdomain:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S58v5
function name:  getDomain
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'example.com'
    7     1*     > RETURN                                                   null

End of function getdomain

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

End of function getsubdomains

Function register:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/S58v5
function name:  register
number of ops:  37
compiled vars:  !0 = $domainKeys, !1 = $subdomains, !2 = $domains, !3 = $san
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        INIT_FCALL                                               'getdomain'
          3        DO_FCALL                                      0  $4      
          4        CAST                                          7  ~5      $4
          5        ASSIGN                                                   !2, ~5
   13     6        IS_EQUAL                                                 !1, null
          7      > JMPZ                                                     ~7, ->16
   14     8    >   INIT_FCALL                                               'array_merge'
          9        SEND_VAR                                                 !2
         10        INIT_FCALL                                               'getsubdomains'
         11        DO_FCALL                                      0  $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                         $9      
         14        ASSIGN                                                   !2, $9
         15      > JMP                                                      ->21
   16    16    >   INIT_FCALL                                               'array_merge'
         17        SEND_VAR                                                 !2
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $11     
         20        ASSIGN                                                   !2, $11
   19    21    >   INIT_FCALL                                               'implode'
         22        SEND_VAL                                                 '%2C'
         23        INIT_FCALL                                               'array_map'
         24        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FS58v5%3A19%240'
   21    25        SEND_VAL                                                 ~13
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                         $14     
         28        SEND_VAR                                                 $14
         29        DO_ICALL                                         $15     
   19    30        ASSIGN                                                   !3, $15
   22    31        NEW                                              $17     'SomeException'
         32        SEND_VAL_EX                                              'yo'
         33        DO_FCALL                                      0          
         34      > THROW                                         0          $17
   23    35*       RETURN                                                   !2
   24    36*     > RETURN                                                   null

End of function register

Function %00%7Bclosure%7D%2Fin%2FS58v5%3A19%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S58v5
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $dns
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   20     1        CONCAT                                           ~1      'DNS%3A', !0
          2      > RETURN                                                   ~1
   21     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FS58v5%3A19%240

Function register2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/S58v5
function name:  register2
number of ops:  20
compiled vars:  !0 = $domainKeys, !1 = $subdomains, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   28     2        INIT_FCALL                                               'register'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0          
          6      > JMP                                                      ->19
   30     7  E > > CATCH                                       last         'Exception'
   31     8    >   NEW                                              $4      'Exception'
          9        INIT_METHOD_CALL                                         !2, 'getMessage'
         10        DO_FCALL                                      0  $5      
         11        CONCAT                                           ~6      'exception+gevangen%3A+', $5
         12        SEND_VAL_EX                                              ~6
         13        INIT_METHOD_CALL                                         !2, 'getCode'
         14        DO_FCALL                                      0  $7      
         15        SEND_VAR_NO_REF_EX                                       $7
         16        SEND_VAR_EX                                              !2
         17        DO_FCALL                                      0          
         18      > THROW                                         0          $4
   33    19    > > RETURN                                                   null

End of function register2

Class SomeException: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.68 ms | 1407 KiB | 25 Q