3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace AcmeSomething; 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/UGbaK
function name:  (null)
number of ops:  9
compiled vars:  !0 = $nonset
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   INIT_NS_FCALL_BY_NAME                                    'AcmeSomething%5Cvar_dump'
          1        INIT_NS_FCALL_BY_NAME                                    'AcmeSomething%5Cregister2'
          2        SEND_VAL_EX                                              null
          3        CAST                                          7  ~1      !0
          4        SEND_VAL_EX                                              ~1
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR_NO_REF_EX                                       $2
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function acmesomething%5Cgetdomain

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

End of function acmesomething%5Cgetsubdomains

Function acmesomething%5Cregister:
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/UGbaK
function name:  AcmeSomething\register
number of ops:  37
compiled vars:  !0 = $domainKeys, !1 = $subdomains, !2 = $domains, !3 = $san
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        INIT_NS_FCALL_BY_NAME                                    'AcmeSomething%5CgetDomain'
          3        DO_FCALL                                      0  $4      
          4        CAST                                          7  ~5      $4
          5        ASSIGN                                                   !2, ~5
   14     6        IS_EQUAL                                                 !1, null
          7      > JMPZ                                                     ~7, ->16
   15     8    >   INIT_NS_FCALL_BY_NAME                                    'AcmeSomething%5Carray_merge'
          9        SEND_VAR_EX                                              !2
         10        INIT_NS_FCALL_BY_NAME                                    'AcmeSomething%5CgetSubdomains'
         11        DO_FCALL                                      0  $8      
         12        SEND_VAR_NO_REF_EX                                       $8
         13        DO_FCALL                                      0  $9      
         14        ASSIGN                                                   !2, $9
         15      > JMP                                                      ->21
   17    16    >   INIT_NS_FCALL_BY_NAME                                    'AcmeSomething%5Carray_merge'
         17        SEND_VAR_EX                                              !2
         18        SEND_VAR_EX                                              !1
         19        DO_FCALL                                      0  $11     
         20        ASSIGN                                                   !2, $11
   20    21    >   INIT_NS_FCALL_BY_NAME                                    'AcmeSomething%5Cimplode'
         22        SEND_VAL_EX                                              '%2C'
         23        INIT_NS_FCALL_BY_NAME                                    'AcmeSomething%5Carray_map'
         24        DECLARE_LAMBDA_FUNCTION                                  '%00acmesomething%5C%7Bclosure%7D%2Fin%2FUGbaK%3A20%240'
   22    25        SEND_VAL_EX                                              ~13
   20    26        SEND_VAR_EX                                              !2
         27        DO_FCALL                                      0  $14     
         28        SEND_VAR_NO_REF_EX                                       $14
         29        DO_FCALL                                      0  $15     
         30        ASSIGN                                                   !3, $15
   23    31        NEW                                              $17     'AcmeSomething%5CSomeException'
         32        SEND_VAL_EX                                              'yo'
         33        DO_FCALL                                      0          
         34      > THROW                                         0          $17
   24    35*       RETURN                                                   !2
   25    36*     > RETURN                                                   null

End of function acmesomething%5Cregister

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

End of function %00acmesomething%5C%7Bclosure%7D%2Fin%2FUGbaK%3A20%240

Function acmesomething%5Cregister2:
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/UGbaK
function name:  AcmeSomething\register2
number of ops:  20
compiled vars:  !0 = $domainKeys, !1 = $subdomains, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   29     2        INIT_NS_FCALL_BY_NAME                                    'AcmeSomething%5Cregister'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
          6      > JMP                                                      ->19
   31     7  E > > CATCH                                       last         'AcmeSomething%5CException'
   32     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
   34    19    > > RETURN                                                   null

End of function acmesomething%5Cregister2

Class AcmeSomething\SomeException: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.93 ms | 1407 KiB | 25 Q