3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ThrowExceptions extends Exception { public static function alreadySent(string $name) { return new static("The campaign {$name} is already sent"); } } class TryThrow { public static function doThrow () { throw ThrowExceptions::alreadySent("Example"); } } TryThrow::doThrow();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HiWun
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_STATIC_METHOD_CALL                                  'TryThrow', 'doThrow'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class ThrowExceptions:
Function alreadysent:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HiWun
function name:  alreadySent
number of ops:  9
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        NEW                          static              $1      
          2        ROPE_INIT                                     3  ~3      'The+campaign+'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_END                                      2  ~2      ~3, '+is+already+sent'
          5        SEND_VAL_EX                                              ~2
          6        DO_FCALL                                      0          
          7      > RETURN                                                   $1
    8     8*     > RETURN                                                   null

End of function alreadysent

End of class ThrowExceptions.

Class TryThrow:
Function dothrow:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/HiWun
function name:  doThrow
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'ThrowExceptions', 'alreadySent'
          1        SEND_VAL                                                 'Example'
          2        DO_FCALL                                      0  $0      
          3      > THROW                                         0          $0
   16     4*     > RETURN                                                   null

End of function dothrow

End of class TryThrow.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
280.12 ms | 1007 KiB | 13 Q