3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function x(): void {} } set_error_handler(function() { echo 'handled'; }); register_shutdown_function(function() { echo 'shutdown...'; }); echo 'before test...'; try { if (time() > 0) { // wrap in if to make sure an error is not throw at compile time class B extends A { public function x() {} } } } catch (\Throwable $e) { echo 'catched'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
Found catch point at position: 15
Branch analysis from position: 15
2 jumps found. (Code = 107) Position 1 = 16, Position 2 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FMoCK
function name:  (null)
number of ops:  18
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FFMoCK%3A7%240'
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
    9     4        INIT_FCALL                                               'register_shutdown_function'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FFMoCK%3A9%241'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
   11     8        ECHO                                                     'before+test...'
   14     9        INIT_FCALL                                               'time'
         10        DO_ICALL                                         $5      
         11        IS_SMALLER                                               0, $5
         12      > JMPZ                                                     ~6, ->14
   15    13    >   DECLARE_CLASS                                            'b', 'a'
         14    > > JMP                                                      ->17
   19    15  E > > CATCH                                       last         'Throwable'
   20    16    >   ECHO                                                     'catched'
   21    17    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FFMoCK%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FMoCK
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'handled'
          1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FFMoCK%3A7%240

Function %00%7Bclosure%7D%2Fin%2FFMoCK%3A9%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FMoCK
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'shutdown...'
          1      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FFMoCK%3A9%241

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

End of function x

End of class A.

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

End of function x

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.26 ms | 1404 KiB | 19 Q