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) { return function ($b) { return function ($c) { echo new A, "\n"; }; }; })(10)(20)(30); } 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 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/OSGYa
function name:  (null)
number of ops:  21
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%2FOSGYa%3A13%241'
   19     2        INIT_DYNAMIC_CALL                                        ~1
          3        SEND_VAL_EX                                              10
          4        DO_FCALL                                      0  $2      
          5        INIT_DYNAMIC_CALL                                        $2
          6        SEND_VAL_EX                                              20
          7        DO_FCALL                                      0  $3      
          8        INIT_DYNAMIC_CALL                                        $3
          9        SEND_VAL_EX                                              30
         10        DO_FCALL                                      0          
         11      > JMP                                                      ->20
   20    12  E > > CATCH                                       last         'Throwable'
   21    13    >   ROPE_INIT                                     3  ~7      'E%21+'
         14        INIT_METHOD_CALL                                         !0, 'getMessage'
         15        DO_FCALL                                      0  $5      
         16        ROPE_ADD                                      1  ~7      ~7, $5
         17        ROPE_END                                      2  ~6      ~7, '%0A'
         18        ECHO                                                     ~6
   22    19      > THROW                                         0          !0
   23    20    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FOSGYa%3A13%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OSGYa
function name:  {closure}
number of ops:  4
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%2FOSGYa%3A14%242'
   18     2      > RETURN                                                   ~1
   19     3*     > RETURN                                                   null

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

Function %00%7Bclosure%7D%2Fin%2FOSGYa%3A14%242:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OSGYa
function name:  {closure}
number of ops:  4
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%2FOSGYa%3A15%243'
   17     2      > RETURN                                                   ~1
   18     3*     > RETURN                                                   null

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

Function %00%7Bclosure%7D%2Fin%2FOSGYa%3A15%243:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OSGYa
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%2FOSGYa%3A15%243

Class A:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OSGYa
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/OSGYa
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:
173.88 ms | 1399 KiB | 13 Q