3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!interface_exists('Throwable', false)) { interface Throwable { public function getMessage(); public function getCode(); public function getFile(); public function getLine(); public function getTrace(); public function getTraceAsString(); public function getPrevious(); public function __toString(); } } if (!class_exists('Error', false)) { // We can't really avoid making this extend Exception in PHP 5. class Error extends Exception implements Throwable { } } if (!class_exists('TypeError', false)) { class TypeError extends Error { } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/ei523
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'interface_exists'
          1        SEND_VAL                                                 'Throwable'
          2        SEND_VAL                                                 <false>
          3        DO_ICALL                                         $0      
          4        BOOL_NOT                                         ~1      $0
          5      > JMPZ                                                     ~1, ->7
    4     6    >   DECLARE_CLASS                                            'throwable'
   17     7    >   INIT_FCALL                                               'class_exists'
          8        SEND_VAL                                                 'Error'
          9        SEND_VAL                                                 <false>
         10        DO_ICALL                                         $2      
         11        BOOL_NOT                                         ~3      $2
         12      > JMPZ                                                     ~3, ->14
   19    13    >   DECLARE_CLASS                                            'error', 'exception'
   25    14    >   INIT_FCALL                                               'class_exists'
         15        SEND_VAL                                                 'TypeError'
         16        SEND_VAL                                                 <false>
         17        DO_ICALL                                         $4      
         18        BOOL_NOT                                         ~5      $4
         19      > JMPZ                                                     ~5, ->21
   26    20    >   DECLARE_CLASS                                            'typeerror', 'error'
   30    21    > > RETURN                                                   1

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

End of function getmessage

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

End of function getcode

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

End of function getfile

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

End of function getline

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

End of function gettrace

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

End of function gettraceasstring

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

End of function getprevious

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ei523
function name:  __toString
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   VERIFY_RETURN_TYPE                                       
          1      > RETURN                                                   null

End of function __tostring

End of class Throwable.

Class Error: [no user functions]
Class TypeError: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.4 ms | 1400 KiB | 17 Q