3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __toString() { return $this->s(); } private function s() { throw new \RuntimeException("BOO!"); } } try { (function ($a) { (function ($b) { (function ($c) { echo new A, "\n"; })(30); })(20); })(10); } catch (\Throwable $e) { echo "E! {$e->getMessage()}\n"; throw $e; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/48hmS
function name:  (null)
number of ops:  15
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'a'
   13     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F48hmS%3A13%241'
   19     2        INIT_DYNAMIC_CALL                                        ~1
          3        SEND_VAL_EX                                              10
          4        DO_FCALL                                      0          
          5      > JMP                                                      ->14
   20     6  E > > CATCH                                       last         'Throwable'
   21     7    >   ROPE_INIT                                     3  ~5      'E%21+'
          8        INIT_METHOD_CALL                                         !0, 'getMessage'
          9        DO_FCALL                                      0  $3      
         10        ROPE_ADD                                      1  ~5      ~5, $3
         11        ROPE_END                                      2  ~4      ~5, '%0A'
         12        ECHO                                                     ~4
   22    13      > THROW                                         0          !0
   23    14    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F48hmS%3A13%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/48hmS
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F48hmS%3A14%242'
   18     2        INIT_DYNAMIC_CALL                                        ~1
          3        SEND_VAL_EX                                              20
          4        DO_FCALL                                      0          
   19     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F48hmS%3A13%241

Function %00%7Bclosure%7D%2Fin%2F48hmS%3A14%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/48hmS
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F48hmS%3A15%243'
   17     2        INIT_DYNAMIC_CALL                                        ~1
          3        SEND_VAL_EX                                              30
          4        DO_FCALL                                      0          
   18     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F48hmS%3A14%242

Function %00%7Bclosure%7D%2Fin%2F48hmS%3A15%243:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/48hmS
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   16     1        NEW                                              $1      'A'
          2        DO_FCALL                                      0          
          3        ECHO                                                     $1
          4        ECHO                                                     '%0A'
   17     5      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F48hmS%3A15%243

Class A:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/48hmS
function name:  __toString
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_METHOD_CALL                                         's'
          1        DO_FCALL                                      0  $0      
          2        VERIFY_RETURN_TYPE                                       $0
          3      > RETURN                                                   $0
    5     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function __tostring

Function s:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/48hmS
function name:  s
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $0      'RuntimeException'
          1        SEND_VAL_EX                                              'BOO%21'
          2        DO_FCALL                                      0          
          3      > THROW                                         0          $0
    9     4*     > RETURN                                                   null

End of function s

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
510.13 ms | 1403 KiB | 15 Q