3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __get($k) { $this->$k = 42; return 0; } } $a = 42; try { $a %= 0; } catch (Error $e) { echo $e->getMessage(), "\n"; } var_dump($a); $test = new ArrayObject; $test[0] = 42; try { $test[0] %= 0; } catch (Error $e) { echo $e->getMessage(), "\n"; } var_dump($test); $test2 = new Test; try { $test2->prop %= 0; } catch (Error $e) { echo $e->getMessage(), "\n"; } var_dump($test2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 3
Branch analysis from position: 3
2 jumps found. (Code = 107) Position 1 = 4, Position 2 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Found catch point at position: 19
Branch analysis from position: 19
2 jumps found. (Code = 107) Position 1 = 20, Position 2 = -2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Found catch point at position: 33
Branch analysis from position: 33
2 jumps found. (Code = 107) Position 1 = 34, Position 2 = -2
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H17Zf
function name:  (null)
number of ops:  42
compiled vars:  !0 = $a, !1 = $e, !2 = $test, !3 = $test2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 42
   11     1        ASSIGN_OP                                     5          !0, 0
          2      > JMP                                                      ->8
   12     3  E > > CATCH                                       last         'Error'
   13     4    >   INIT_METHOD_CALL                                         !1, 'getMessage'
          5        DO_FCALL                                      0  $6      
          6        ECHO                                                     $6
          7        ECHO                                                     '%0A'
   15     8    >   INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
   17    11        NEW                                              $8      'ArrayObject'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !2, $8
   18    14        ASSIGN_DIM                                               !2, 0
         15        OP_DATA                                                  42
   20    16        ASSIGN_DIM_OP                %=               5          !2, 0
         17        OP_DATA                                                  0
         18      > JMP                                                      ->24
   21    19  E > > CATCH                                       last         'Error'
   22    20    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         21        DO_FCALL                                      0  $13     
         22        ECHO                                                     $13
         23        ECHO                                                     '%0A'
   24    24    >   INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                                 
   26    27        NEW                                              $15     'Test'
         28        DO_FCALL                                      0          
         29        ASSIGN                                                   !3, $15
   28    30        ASSIGN_OBJ_OP                                 5          !3, 'prop'
         31        OP_DATA                                                  0
         32      > JMP                                                      ->38
   29    33  E > > CATCH                                       last         'Error'
   30    34    >   INIT_METHOD_CALL                                         !1, 'getMessage'
         35        DO_FCALL                                      0  $19     
         36        ECHO                                                     $19
         37        ECHO                                                     '%0A'
   32    38    >   INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !3
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Class Test:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H17Zf
function name:  __get
number of ops:  5
compiled vars:  !0 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN_OBJ                                               !0
          2        OP_DATA                                                  42
    5     3      > RETURN                                                   0
    6     4*     > RETURN                                                   null

End of function __get

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.58 ms | 1400 KiB | 15 Q