3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Declaring your struct/shape */ $person = new class() extends shapeClass { public $age = 15, $height = 72, $weight = 200; }; var_dump($person); var_dump($person->age); $person->age = 19; var_dump($person->age); try { var_dump($person->badProp); } catch (Exception $e) { var_dump($e); } try { $person->badProp = 5; } catch (Exception $e) { var_dump($e); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 22
Branch analysis from position: 22
2 jumps found. (Code = 107) Position 1 = 23, Position 2 = -2
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Found catch point at position: 29
Branch analysis from position: 29
2 jumps found. (Code = 107) Position 1 = 30, Position 2 = -2
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GrhZG
function name:  (null)
number of ops:  34
compiled vars:  !0 = $person, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_ANON_CLASS                               3       'shapeclass'
          1        NEW                                              $3      $2
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    8     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   10     7        INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_R                                      ~7      !0, 'age'
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                                 
   11    11        ASSIGN_OBJ                                               !0, 'age'
         12        OP_DATA                                                  19
   12    13        INIT_FCALL                                               'var_dump'
         14        FETCH_OBJ_R                                      ~10     !0, 'age'
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                                 
   15    17        INIT_FCALL                                               'var_dump'
         18        FETCH_OBJ_R                                      ~12     !0, 'badProp'
         19        SEND_VAL                                                 ~12
         20        DO_ICALL                                                 
         21      > JMP                                                      ->26
   16    22  E > > CATCH                                       last         'Exception'
   17    23    >   INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
   21    26    >   ASSIGN_OBJ                                               !0, 'badProp'
         27        OP_DATA                                                  5
         28      > JMP                                                      ->33
   22    29  E > > CATCH                                       last         'Exception'
   23    30    >   INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !1
         32        DO_ICALL                                                 
   24    33    > > RETURN                                                   1

Class shapeClass@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
191.49 ms | 1396 KiB | 15 Q