3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A extends stdClass {} $r = new ReflectionClass('A'); try { $r->newInstanceWithoutConstructor(); echo 'Succeeded'; } catch (Throwable $e) { echo 'Failed with throwable'; } catch (Exception $e) { echo 'Failed with exception'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 11
2 jumps found. (Code = 107) Position 1 = 12, Position 2 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 11
Branch analysis from position: 11
filename:       /in/q3E99
function name:  (null)
number of ops:  14
compiled vars:  !0 = $r, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'A'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    8     4        INIT_METHOD_CALL                                         !0, 'newInstanceWithoutConstructor'
          5        DO_FCALL                                      0          
    9     6        ECHO                                                     'Succeeded'
          7      > JMP                                                      ->13
   10     8  E > > CATCH                                                    'Throwable', ->11
   11     9    >   ECHO                                                     'Failed+with+throwable'
         10      > JMP                                                      ->13
   12    11  E > > CATCH                                       last         'Exception'
   13    12    >   ECHO                                                     'Failed+with+exception'
   14    13    > > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
198 ms | 1385 KiB | 13 Q